mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.0826: too many #ifdefs
Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
This commit is contained in:
11
src/move.c
11
src/move.c
@@ -508,17 +508,12 @@ check_cursor_moved(win_T *wp)
|
||||
}
|
||||
else if (wp->w_cursor.col != wp->w_valid_cursor.col
|
||||
|| wp->w_leftcol != wp->w_valid_leftcol
|
||||
#ifdef FEAT_VIRTUALEDIT
|
||||
|| wp->w_cursor.coladd != wp->w_valid_cursor.coladd
|
||||
#endif
|
||||
)
|
||||
|| wp->w_cursor.coladd != wp->w_valid_cursor.coladd)
|
||||
{
|
||||
wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
|
||||
wp->w_valid_cursor.col = wp->w_cursor.col;
|
||||
wp->w_valid_leftcol = wp->w_leftcol;
|
||||
#ifdef FEAT_VIRTUALEDIT
|
||||
wp->w_valid_cursor.coladd = wp->w_cursor.coladd;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2800,9 +2795,7 @@ do_check_cursorbind(void)
|
||||
{
|
||||
linenr_T line = curwin->w_cursor.lnum;
|
||||
colnr_T col = curwin->w_cursor.col;
|
||||
# ifdef FEAT_VIRTUALEDIT
|
||||
colnr_T coladd = curwin->w_cursor.coladd;
|
||||
# endif
|
||||
colnr_T curswant = curwin->w_curswant;
|
||||
int set_curswant = curwin->w_set_curswant;
|
||||
win_T *old_curwin = curwin;
|
||||
@@ -2829,9 +2822,7 @@ do_check_cursorbind(void)
|
||||
# endif
|
||||
curwin->w_cursor.lnum = line;
|
||||
curwin->w_cursor.col = col;
|
||||
# ifdef FEAT_VIRTUALEDIT
|
||||
curwin->w_cursor.coladd = coladd;
|
||||
# endif
|
||||
curwin->w_curswant = curswant;
|
||||
curwin->w_set_curswant = set_curswant;
|
||||
|
||||
|
Reference in New Issue
Block a user