]> git.lyx.org Git - features.git/commitdiff
little optimization: avoid a duplicate cursor get from buffer
authorStephan Witt <switt@lyx.org>
Mon, 20 Dec 2010 07:10:05 +0000 (07:10 +0000)
committerStephan Witt <switt@lyx.org>
Mon, 20 Dec 2010 07:10:05 +0000 (07:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36963 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/Menus.cpp

index 56355ff9cb2b3bc29a5b5f9b85aa979180c2531d..bd2e35c6d7a220e0800febdfcc19735f0885d3b4 100644 (file)
@@ -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: