]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
partial fix for bug 6986: Use the right tex2lyx (at least if tex2lyx is installed)
[lyx.git] / src / BufferView.cpp
index 488a998810f1f37b4abdba2be7d49274d7eb448e..b8971fc98e02d0e1c3f7d4c5dba44e03d4cf3398 100644 (file)
@@ -1539,10 +1539,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                FindAndReplaceOptions opt;
                istringstream iss(to_utf8(cmd.argument()));
                iss >> opt;
-               if (findAdv(this, opt))
+               if (findAdv(this, opt)) {
                        dr.screenUpdate(Update::Force | Update::FitCursor);
-               else
+                       cur.dispatched();
+                       dispatched = true;
+               } else {
+                       cur.undispatched();
                        dispatched = false;
+               }
                break;
        }
 
@@ -1875,13 +1879,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        }
 
        default:
-               dispatched = false;
+               // OK, so try the Buffer itself...
+               buffer_.dispatch(cmd, dr);
+               dispatched = dr.dispatched();
                break;
        }
 
        buffer_.undo().endUndoGroup();
        dr.dispatched(dispatched);
-       return;
 }
 
 
@@ -2855,6 +2860,12 @@ DocIterator const & BufferView::inlineCompletionPos() const
 }
 
 
+bool BufferView::fixInlineCompletionPos()
+{
+       return d->inlineCompletionPos_.fixIfBroken();
+}
+
+
 bool samePar(DocIterator const & a, DocIterator const & b)
 {
        if (a.empty() && b.empty())