Skip to content

Commit

Permalink
corrected check when to set the modified line is new flag
Browse files Browse the repository at this point in the history
one of the conditions for setting this flag was when the cursor ends up
at the end of the line and characters were added, however, this check
incorrectly sets the flag for certain conditions like when a selection
is replaced - characters are added but the new flag should not be set

the check was changed to if lines were added by using the net line count
  • Loading branch information
thunder422 committed Mar 20, 2013
1 parent faa2467 commit dea0ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editbox.cpp
Expand Up @@ -235,7 +235,7 @@ void EditBox::documentChanged(int position, int charsRemoved, int charsAdded)

// check if last line is new before linesModified is changed
if (linesModified == netLineCount && !changeAtLineBegin
|| cursor.atBlockEnd() && charsAdded > 0)
|| cursor.atBlockEnd() && netLineCount > 0)
{
m_lineModifiedIsNew = true;
}
Expand Down

0 comments on commit dea0ef4

Please sign in to comment.