From 5ee3c34096dde6353af9910e03a3eb6136e92a88 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 28 Jan 2011 07:01:38 +0000 Subject: [PATCH] save the correct last position of misspelled words in spell checker state (thanks JMarc) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37340 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index c7aa8b9513..3036d45763 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -391,12 +391,9 @@ public: { pos_type textsize = owner_->size(); // check for sane arguments - if (to < from || from >= textsize) + if (to <= from || from >= textsize) return; - FontSpan fp = FontSpan(from, to); - // don't mark end of paragraph - if (fp.last >= textsize) - fp.last = textsize - 1; + FontSpan fp = FontSpan(from, to - 1); speller_state_.setRange(fp, state); } -- 2.39.2