// First try to make the selection start visible
// (which is just the cursor when there is no selection)
scrollToCursor(d->cursor_.selectionBegin(), false);
+ // Metrics have to be recomputed (maybe again)
+ updateMetrics();
// Is the cursor visible? (only useful if cursor is at end of selection)
- if (needsFitCursor())
+ if (needsFitCursor()) {
// then try to make cursor visible instead
scrollToCursor(d->cursor_, false);
- // Metrics have to be recomputed (maybe again)
- updateMetrics(flags);
+ // Metrics have to be recomputed (maybe again)
+ updateMetrics(flags);
+ }
}
flags = flags & ~Update::FitCursor;
}