Only move overlay line/pre-edit position when cursor is visible

This might help with #4849
This commit is contained in:
Kovid Goyal 2022-03-22 10:35:55 +05:30
parent f9f69a0577
commit 5a36fbfe7b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -752,7 +752,7 @@ struct SaveOverlayLine {
static void
save_overlay_line(struct SaveOverlayLine *sol) {
if (sol->screen->overlay_line.is_active) {
if (sol->screen->overlay_line.is_active && screen_is_cursor_visible(sol->screen)) {
sol->overlay_text = get_overlay_text(sol->screen);
deactivate_overlay_line(sol->screen);
}