+ // Case when no explicit update is requested.
+ if (!flags) {
+ // no need to do anything.
+ return make_pair(false, false);
+ }
+
+ if (flags == Update::FitCursor) {
+ bool const fit_cursor = fitCursor();
+ if (fit_cursor)
+ updateMetrics(false);
+ // tell the frontend to update the screen.
+ return make_pair(fit_cursor, false);
+ }
+
+ bool full_metrics = flags & Update::Force;
+ if (flags & Update::MultiParSel)
+ full_metrics |= multiParSel();
+
+ bool const single_par = !full_metrics;
+ updateMetrics(single_par);
+
+ if (flags & Update::FitCursor && fitCursor())
+ updateMetrics(false);
+
+ // tell the frontend to update the screen.
+ return make_pair(true, single_par);