diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2015-10-02 18:53:58 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2015-10-02 18:53:58 +0000 |
commit | 195e0f57ed995f77b5e7296708ecaab982533591 (patch) | |
tree | 6bdadb17cc761b2478b3d5cb9077723b1b54bd80 /plugins | |
parent | 8f1b248b0e75ca6ae9c317ea8692d7acf03439dc (diff) |
reverting last revert
git-svn-id: http://svn.miranda-ng.org/main/trunk@15497 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SpellChecker/src/RichEdit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/SpellChecker/src/RichEdit.cpp b/plugins/SpellChecker/src/RichEdit.cpp index b6b0f7ba73..0fdcf62e36 100644 --- a/plugins/SpellChecker/src/RichEdit.cpp +++ b/plugins/SpellChecker/src/RichEdit.cpp @@ -296,11 +296,12 @@ int RichEdit::FixSel(CHARRANGE *to_fix, CHARRANGE sel_changed, int new_len) return dif;
int newMax = sel_changed.cpMax + dif;
+ int newMin = sel_changed.cpMin + dif;
- if (to_fix->cpMin >= sel_changed.cpMax)
+ if (to_fix->cpMin >= sel_changed.cpMin)
to_fix->cpMin += dif;
- else if (to_fix->cpMin >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax
- to_fix->cpMin = newMax;
+ else if (to_fix->cpMin >= newMin) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax
+ to_fix->cpMin = newMin;
if (to_fix->cpMax >= sel_changed.cpMax)
to_fix->cpMax += dif;
|