From: Stephan Witt Date: Mon, 20 Dec 2010 07:10:05 +0000 (+0000) Subject: little optimization: avoid a duplicate cursor get from buffer X-Git-Tag: 2.0.0~1302 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3bb4d6559d46b9a541d6c12f105f659e82c49e53;p=features.git little optimization: avoid a duplicate cursor get from buffer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36963 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 56355ff9cb..bd2e35c6d7 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -747,10 +747,10 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv) return; WordLangTuple wl; docstring_list suggestions; - pos_type from = bv->cursor().pos(); - pos_type to = from; Cursor const & cur = bv->cursor(); Paragraph const & par = cur.paragraph(); + pos_type from = cur.pos(); + pos_type to = from; SpellChecker::Result res = par.spellCheck(from, to, wl, suggestions, true, true); switch (res) { case SpellChecker::UNKNOWN_WORD: