summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-26 17:28:26 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-26 17:28:26 +0100
commit29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf (patch)
tree66144403e05268df8594b01d0298db4f570ed60f /src/misc1.c
parent3e460fd8b72db905fbf9f01b00371384ffc415b8 (diff)
patch 8.1.0826: too many #ifdefsv8.1.0826
Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code.
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 0c38c8af53..1db7496c07 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -622,9 +622,7 @@ get_number_indent(linenr_T lnum)
{
pos.lnum = lnum;
pos.col = (colnr_T)(*regmatch.endp - ml_get(lnum));
-#ifdef FEAT_VIRTUALEDIT
pos.coladd = 0;
-#endif
}
vim_regfree(regmatch.regprog);
}
@@ -1708,9 +1706,7 @@ open_line(
changed_lines(curwin->w_cursor.lnum, 0, curwin->w_cursor.lnum, 1L);
curwin->w_cursor.col = newcol;
-#ifdef FEAT_VIRTUALEDIT
curwin->w_cursor.coladd = 0;
-#endif
#if defined(FEAT_LISP) || defined(FEAT_CINDENT)
/*
@@ -1781,9 +1777,7 @@ open_line(
/* Insert new stuff into line again */
curwin->w_cursor.col = 0;
-#ifdef FEAT_VIRTUALEDIT
curwin->w_cursor.coladd = 0;
-#endif
ins_bytes(p_extra); /* will call changed_bytes() */
vim_free(p_extra);
next_line = NULL;
@@ -2354,11 +2348,9 @@ ins_char_bytes(char_u *buf, int charlen)
linenr_T lnum = curwin->w_cursor.lnum;
int i;
-#ifdef FEAT_VIRTUALEDIT
/* Break tabs if needed. */
if (virtual_active() && curwin->w_cursor.coladd > 0)
coladvance_force(getviscol());
-#endif
col = curwin->w_cursor.col;
oldp = ml_get(lnum);
@@ -2499,10 +2491,8 @@ ins_str(char_u *s)
colnr_T col;
linenr_T lnum = curwin->w_cursor.lnum;
-#ifdef FEAT_VIRTUALEDIT
if (virtual_active() && curwin->w_cursor.coladd > 0)
coladvance_force(getviscol());
-#endif
col = curwin->w_cursor.col;
oldp = ml_get(lnum);
@@ -2637,15 +2627,10 @@ del_bytes(
* unless "restart_edit" is set or 'virtualedit' contains "onemore".
*/
if (col > 0 && fixpos && restart_edit == 0
-#ifdef FEAT_VIRTUALEDIT
- && (ve_flags & VE_ONEMORE) == 0
-#endif
- )
+ && (ve_flags & VE_ONEMORE) == 0)
{
--curwin->w_cursor.col;
-#ifdef FEAT_VIRTUALEDIT
curwin->w_cursor.coladd = 0;
-#endif
if (has_mbyte)
curwin->w_cursor.col -=
(*mb_head_off)(oldp, oldp + curwin->w_cursor.col);