diff options
Diffstat (limited to 'dw/textblock.hh')
-rw-r--r-- | dw/textblock.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh index 99d1e713..5f588a23 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -515,6 +515,16 @@ protected: { return lineYOffsetCanvas (lines->getRef (lineIndex)); } + + inline int calcPenaltyIndexForNewLine () + { + if (lines->size() == 0) + return 0; + else + return + (words->getRef(lines->getLastRef()->lastWord)->flags & + (Word::DIV_CHAR_AT_EOL | Word::PERM_DIV_CHAR)) ? 1 : 0; + } bool sendSelectionEvent (core::SelectionState::EventType eventType, core::MousePositionEvent *event); |