mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
vim-patch:8.2.3227: 'virtualedit' can only be set globally
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638)
53ba05b090
I changed some macros to unsigned integer literals to avoid compiler warnings.
This commit is contained in:
@@ -1215,18 +1215,18 @@ static void win_update(win_T *wp, Providers *providers)
|
||||
*/
|
||||
if (VIsual_mode == Ctrl_V) {
|
||||
colnr_T fromc, toc;
|
||||
int save_ve_flags = ve_flags;
|
||||
unsigned int save_ve_flags = curbuf->b_ve_flags;
|
||||
|
||||
if (curwin->w_p_lbr) {
|
||||
ve_flags = VE_ALL;
|
||||
curbuf->b_ve_flags = VE_ALL;
|
||||
}
|
||||
|
||||
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
|
||||
ve_flags = save_ve_flags;
|
||||
curbuf->b_ve_flags = save_ve_flags;
|
||||
toc++;
|
||||
// Highlight to the end of the line, unless 'virtualedit' has
|
||||
// "block".
|
||||
if (curwin->w_curswant == MAXCOL && !(ve_flags & VE_BLOCK)) {
|
||||
if (curwin->w_curswant == MAXCOL && !(get_ve_flags() & VE_BLOCK)) {
|
||||
toc = MAXCOL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user