From 039f25e65718bd5008de02815b008ba6a7051477 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Thu, 23 Jul 2015 23:27:47 -0400 Subject: [PATCH] Set font in BufferView::setCursor (#9500) This solves a few bugs related to the font not being set correctly. For example, when putting a selection somewhere with putSelectionAt(), the font was not reset so that before this commit if the cursor was in an ERT, strange things could happen. putSelectionAt() is notably used when highlighting the location corresponding with a LaTeX error (GuiErrorList), when using find, and when using the spellcheck. I could reproduce the bug using all three of these. Bug #9500 is an example of the type of bugs that this commit fixes. (cherry picked from commit f8774a446b2feb8edf664ecc71a491fce103b043) --- src/BufferView.cpp | 1 + status.21x | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 0640898abd..4eb68af948 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2458,6 +2458,7 @@ void BufferView::setCursor(DocIterator const & dit) d->cursor_.setCursor(dit); d->cursor_.setSelection(false); + d->cursor_.setCurrentFont(); // FIXME // It seems on general grounds as if this is probably needed, but // it is not yet clear. diff --git a/status.21x b/status.21x index afb9326bad..1aaca2e5ea 100644 --- a/status.21x +++ b/status.21x @@ -73,6 +73,8 @@ What's new - Reset cursor font when leaving an inset to the left (bug 6032). +- Reset cursor font when navigating with find or spellcheck (bug 9500). + - Correctly update previews when cursor leaves inset (bug 6173).