From eb1bad721088dea6a3617b3e3f946258a43f9fe5 Mon Sep 17 00:00:00 2001 From: Alfredo Braunstein Date: Tue, 4 Nov 2003 10:30:36 +0000 Subject: [PATCH] small fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8030 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlSpellchecker.C | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 8b2dcc9531..67e532930d 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2003-11-04 Alfredo Braunstein + + * ControlSpellchecker.C (nextWord): do not send ligature breaks + and other nasty insets to the spellchecker + 2003-11-04 Alfredo Braunstein * ControlSpellchecker.[Ch] (nextWord, check): rewrite of the text diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index cb81403b01..3869fe8930 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -170,8 +170,11 @@ WordLangTuple nextWord(PosIterator & cur, PosIterator const & end, string str; // and find the end of the word (insets like optional hyphens // and ligature break are part of a word) - for (; cur != end && isLetter(cur); ++cur, ++progress) - str += cur.pit()->getChar(cur.pos()); + for (; cur != end && isLetter(cur); ++cur, ++progress) { + if (!cur.pit()->isInset(cur.pos())) + str += cur.pit()->getChar(cur.pos()); + } + return WordLangTuple(str, lang_code); }