X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfunc.C;h=56a79f8ab69411f947b543d983fbac3ece7bace4;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=51bc8e0725b222994b1e88e6d2d804fb8e9fe570;hpb=686f1e276f013e2dc56e3025798c7131bef173f5;p=lyx.git diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 51bc8e0725..56a79f8ab6 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -601,6 +601,7 @@ void loadTextclass(string const & name) void LyXFunc::dispatch(FuncRequest const & cmd) { + BOOST_ASSERT(view()); string const argument = cmd.argument; kb_action const action = cmd.action; @@ -1450,7 +1451,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd) update |= view()->cursor().result().update(); else update |= view()->dispatch(cmd); - break; } } @@ -1459,14 +1459,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd) // Redraw screen unless explicitly told otherwise. // This also initializes the position cache for all insets // in (at least partially) visible top-level paragraphs. - if (update) - view()->update(); - - // fitCursor() needs valid inset position. The previous call to - // update() makes sure we have such even for freshly created - // insets. - if (view()->fitCursor()) - view()->update(); + view()->update(true, update); + // if we executed a mutating lfun, mark the buffer as dirty if (getStatus(cmd).enabled() && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)