+ if (lyxrc.spellcheck_continuously && !needsUpdate) {
+ // Check for misspelled text
+ // The redraw is useful because of the painting of
+ // misspelled markers depends on the cursor position.
+ // Trigger a redraw for cursor moves inside misspelled text.
+ if (!cur.inTexted()) {
+ // move from regular text to math
+ needsUpdate = last_misspelled;
+ } else if (oldTopSlice != cur.top() || oldBoundary != cur.boundary()) {
+ // move inside regular text
+ needsUpdate = last_misspelled
+ || cur.paragraph().isMisspelled(cur.pos(), true);
+ }
+ }
+