]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / lyxfunc.C
index 4abde3aecf3bea064eaf76ea3238f29c5ae6d832..36ec96f45b027951f4776528efd40d91926fd93e 100644 (file)
@@ -1518,12 +1518,14 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                }
                }
 
-               BOOST_ASSERT(view());
                if (view()->available()) {
                        // Redraw screen unless explicitly told otherwise.
                        // This also initializes the position cache for all insets
                        // in (at least partially) visible top-level paragraphs.
-                       view()->update(true, update);
+                       if (update)
+                               view()->update(Update::FitCursor | Update::Force);
+                       else
+                               view()->update(Update::FitCursor);
 
                        // if we executed a mutating lfun, mark the buffer as dirty
                        // FIXME: Why not use flag.enabled() but call getStatus again?