// Update the status line if the cursor moved.
if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor))
wp->w_redr_status = TRUE;
+
+ // In case the command moved the cursor or changed the Visual area,
+ // check it is valid.
+ check_cursor();
+ if (VIsual_active)
+ check_pos(curbuf, &VIsual);
}
}
call setline(1, ['a', 'b', 'c'])
new
wincmd p
+ " start Visual in current window, redraw in other window with fewer lines
call feedkeys("G\<C-V>", 'txn')
call win_execute(winnr('#')->win_getid(), 'redraw')
+ call feedkeys("\<Esc>", 'txn')
+ bwipe!
+ bwipe!
+
+ enew
+ new
+ call setline(1, ['a', 'b', 'c'])
+ let winid = win_getid()
+ wincmd p
+ " start Visual in current window, extend it in other window with more lines
+ call feedkeys("\<C-V>", 'txn')
+ call win_execute(winid, 'call feedkeys("G\<C-V>", ''txn'')')
+ redraw
+
bwipe!
bwipe!
endfunc