* only remember the last selection if it didn't come by the cursor completion indicator

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23316 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2008-02-28 12:43:24 +00:00
parent f7cd0928ad
commit 93d8667d39

View File

@ -341,11 +341,13 @@ void GuiCompleter::updatePrefix(Cursor & cur)
// if popup is not empty, the new selection will // if popup is not empty, the new selection will
// be our last valid one // be our last valid one
QString const & s = currentCompletion(); QString const & s = currentCompletion();
if (s.length() > 0) if (popupVisible() || inlineVisible()) {
last_selection_ = s; if (s.length() > 0)
else last_selection_ = s;
last_selection_ = old; else
last_selection_ = old;
}
// update inline completion because the default // update inline completion because the default
// completion string might have changed // completion string might have changed
if (inlineVisible()) if (inlineVisible())
@ -460,11 +462,13 @@ void GuiCompleter::updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate
// if popup is not empty, the new selection will // if popup is not empty, the new selection will
// be our last valid one // be our last valid one
QString const & s = currentCompletion(); if (popupVisible() || inlineVisible()) {
if (s.length() > 0) QString const & s = currentCompletion();
last_selection_ = s; if (s.length() > 0)
else last_selection_ = s;
last_selection_ = old; else
last_selection_ = old;
}
// show inline completion // show inline completion
if (inlineUpdate) if (inlineUpdate)