From 8f1b248b0e75ca6ae9c317ea8692d7acf03439dc Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 2 Oct 2015 18:42:32 +0000 Subject: SpellChecker: partially reverted git-svn-id: http://svn.miranda-ng.org/main/trunk@15496 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/RichEdit.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/SpellChecker/src/RichEdit.cpp b/plugins/SpellChecker/src/RichEdit.cpp index 0fdcf62e36..b6b0f7ba73 100644 --- a/plugins/SpellChecker/src/RichEdit.cpp +++ b/plugins/SpellChecker/src/RichEdit.cpp @@ -296,12 +296,11 @@ 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.cpMin) + if (to_fix->cpMin >= sel_changed.cpMax) to_fix->cpMin += dif; - else if (to_fix->cpMin >= newMin) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax - to_fix->cpMin = newMin; + else if (to_fix->cpMin >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax + to_fix->cpMin = newMax; if (to_fix->cpMax >= sel_changed.cpMax) to_fix->cpMax += dif; -- cgit v1.2.3