]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
GuiSearch did not work with num. keypad enter
[lyx.git] / src / Buffer.cpp
index f2a370235a1374997b25903cae402c2c23ea0904..8414efa20439fbe50cc696f74dd1debc96caafcc 100644 (file)
@@ -2944,7 +2944,9 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                                undo().recordUndoBufferParams(CursorData());
                                branch_list.add(branch_name);
                                branch = branch_list.find(branch_name);
-                               branch->setColors("background", "background");
+                               if (branch)
+                                       // needed to update the color table for dark mode
+                                       branch->setColors("background", "background");
                                dr.setError(false);
                                dr.screenUpdate(Update::Force);
                        }
@@ -5007,6 +5009,8 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const
        cbuf.tocBackend().update(true, utype);
        if (scope == UpdateMaster)
                cbuf.structureChanged();
+
+       d->need_update = false;
 }