mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
more careful check for mathed to normal text change and vice versa for correct display of misspelled markers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37020 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ef1561665c
commit
29d849f251
@ -2174,13 +2174,17 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
needsUpdate |= (cur.pos() != cur.lastpos()) && cur.selection();
|
||||
|
||||
if (lyxrc.spellcheck_continuously && !needsUpdate && cur.inTexted()) {
|
||||
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.paragraph().id() != last_pid || cur.pos() != last_pos) {
|
||||
needsUpdate |= last_misspelled || cur.paragraph().isMisspelled(cur.pos());
|
||||
if (!cur.inTexted()) {
|
||||
// move from regular text to math
|
||||
needsUpdate = last_misspelled;
|
||||
} else if (cur.paragraph().id() != last_pid || cur.pos() != last_pos) {
|
||||
// move inside regular text
|
||||
needsUpdate = last_misspelled || cur.paragraph().isMisspelled(cur.pos());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ void RowPainter::paintFromPos(pos_type & vpos, bool changed)
|
||||
BufferView const * bv = pi_.base.bv;
|
||||
Cursor const & cur = bv->cursor();
|
||||
bool current_word = false;
|
||||
if (par_.id() == cur.paragraph().id()) {
|
||||
if (cur.inTexted() && par_.id() == cur.paragraph().id()) {
|
||||
pos_type cpos = cur.pos();
|
||||
if (cpos > 0 && cpos == par_.size() && !par_.isWordSeparator(cpos-1))
|
||||
--cpos;
|
||||
|
Loading…
Reference in New Issue
Block a user