From 73460423ad684b8728fe7bdf51f27dbc5cae5ea9 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sun, 19 Apr 2015 13:46:04 -0400 Subject: [PATCH] Update previews after pasting (#6211) The reason we want to do this is for if there is pasting across buffers. For within buffer, the previews should already be updated. Calling the buffer-wide updatePreviews() might seem like overkill, but actually it should be quick because only the previews that need updating are updated (and this check feels quick to me, although I did not profile). If we were to loop through the pasted text and update each preview individually, this might take more time. When updating previews together, only one .tex file is compiled. --- src/Text3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Text3.cpp b/src/Text3.cpp index 8398dd7b50..4bd45c488a 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1312,6 +1312,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) bv->buffer().errors("Paste"); cur.clearSelection(); // bug 393 cur.finishUndo(); + bv->buffer().updatePreviews(); break; } -- 2.39.2