diff options
author | nyamatongwe <unknown> | 2009-07-08 00:14:41 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-07-08 00:14:41 +0000 |
commit | ec28516b5908c2aabd5c7381af65e79ef2dc7fff (patch) | |
tree | 40fb06f7739fb74955b5185bc9b7f4e58021b4c2 /src/Selection.cxx | |
parent | a8253c4498fe0ca70458d03b86315b728988d08e (diff) | |
download | scintilla-mirror-ec28516b5908c2aabd5c7381af65e79ef2dc7fff.tar.gz |
Moved calculation of rectangular range from occurring after every style
change to after the styles have been valided. Previously was very slow when
setting monospaced font mode.
Made more code sensitive to virtual spaces to draw caret and selection more
accurately.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index 715319602..d4d4d8fe8 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -113,6 +113,7 @@ bool SelectionRange::ContainsCharacter(int posCharacter) const { bool SelectionRange::Intersect(int start, int end, SelectionPosition &selStart, SelectionPosition &selEnd) const { SelectionPosition spEnd(end, 100000); // Large amount of virtual space + SelectionPosition spStart(start); SelectionPosition first; SelectionPosition last; if (anchor > caret) { @@ -122,7 +123,7 @@ bool SelectionRange::Intersect(int start, int end, SelectionPosition &selStart, first = anchor; last = caret; } - if ((first < spEnd) && (last.Position() > start)) { + if ((first < spEnd) && (last > spStart)) { if (start > first.Position()) selStart = SelectionPosition(start); else |