diff options
author | nyamatongwe <devnull@localhost> | 2009-07-06 02:36:39 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-07-06 02:36:39 +0000 |
commit | dd70872fc8d334ebe216ce31f292c0501ce52058 (patch) | |
tree | 476635c73503f09b0ef8149ddcc25664111ef4e6 /src | |
parent | a2aad3f4adca979ad4da66764655b94bae648574 (diff) | |
download | scintilla-mirror-dd70872fc8d334ebe216ce31f292c0501ce52058.tar.gz |
Fix up some drawing glitches with end of line selection not being removed.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 88fd0bbeb..a2abba607 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -711,9 +711,10 @@ void Editor::InvalidateSelection(SelectionRange newMain, bool invalidateWholeSel if (sel.Count() > 1 || !(sel.RangeMain().anchor == newMain.anchor) || sel.IsRectangular()) { invalidateWholeSelection = true; } - int firstAffected = newMain.Start().Position(); + int firstAffected = Platform::Minimum(sel.RangeMain().Start().Position(), newMain.Start().Position()); // +1 for lastAffected ensures caret repainted int lastAffected = Platform::Maximum(newMain.caret.Position()+1, newMain.anchor.Position()); + lastAffected = Platform::Maximum(lastAffected, sel.RangeMain().End().Position()); if (invalidateWholeSelection) { for (size_t r=0; r<sel.Count(); r++) { firstAffected = Platform::Minimum(firstAffected, sel.Range(r).caret.Position()); |