mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 16:31:13 +00:00
Always update buffer when language is being changed (#12481)
This commit is contained in:
parent
895de6f960
commit
9729b22d9e
@ -118,6 +118,11 @@ static void toggleAndShow(Cursor & cur, Text * text,
|
|||||||
cur.real_current_font))
|
cur.real_current_font))
|
||||||
text->setCursor(cur, cur.pit(), cur.pos(),
|
text->setCursor(cur, cur.pit(), cur.pos(),
|
||||||
false, !cur.boundary());
|
false, !cur.boundary());
|
||||||
|
if (font.language() != ignore_language)
|
||||||
|
// We need a buffer update if we change the language
|
||||||
|
// (e.g., with info insets or if the selection contains
|
||||||
|
// a par label)
|
||||||
|
cur.forceBufferUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2520,10 +2525,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
selectWordWhenUnderCursor(cur, WHOLE_WORD_STRICT);
|
selectWordWhenUnderCursor(cur, WHOLE_WORD_STRICT);
|
||||||
Font font(ignore_font, lang);
|
Font font(ignore_font, lang);
|
||||||
toggleAndShow(cur, this, font, toggle);
|
toggleAndShow(cur, this, font, toggle);
|
||||||
// We need a buffer update if we change the language
|
|
||||||
// of an info inset
|
|
||||||
if (cur.insetInSelection(INFO_CODE))
|
|
||||||
cur.forceBufferUpdate();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2558,10 +2559,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
freeFonts.push(make_pair(props, font));
|
freeFonts.push(make_pair(props, font));
|
||||||
toggleall = toggle;
|
toggleall = toggle;
|
||||||
toggleAndShow(cur, this, font, toggleall);
|
toggleAndShow(cur, this, font, toggleall);
|
||||||
// We need a buffer update if we change the language
|
|
||||||
// of an info inset
|
|
||||||
if (cur.insetInSelection(INFO_CODE))
|
|
||||||
cur.forceBufferUpdate();
|
|
||||||
cur.message(bformat(_("Text properties applied: %1$s"), props));
|
cur.message(bformat(_("Text properties applied: %1$s"), props));
|
||||||
} else
|
} else
|
||||||
LYXERR0("Invalid argument of textstyle-update");
|
LYXERR0("Invalid argument of textstyle-update");
|
||||||
|
Loading…
Reference in New Issue
Block a user