When moving cursor, always reset anchor

This applies to BufferView::moveToPosition, which is used for bookmarks and initial cursor position (on loading).

Fixes bug #9912.
This commit is contained in:
Jean-Marc Lasgouttes 2016-01-05 11:12:00 +01:00
parent d3c0044617
commit 01fc62b78e

View File

@ -809,6 +809,8 @@ bool BufferView::moveToPosition(pit_type bottom_pit, pos_type bottom_pos,
setCursor(dit);
// set the current font.
d->cursor_.setCurrentFont();
// Do not forget to reset the anchor (see #9912)
d->cursor_.resetAnchor();
// To center the screen on this new position we need the
// paragraph position which is computed at draw() time.
// So we need a redraw!