diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-26 17:28:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-26 17:28:26 +0100 |
commit | 29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf (patch) | |
tree | 66144403e05268df8594b01d0298db4f570ed60f /src/mbyte.c | |
parent | 3e460fd8b72db905fbf9f01b00371384ffc415b8 (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/mbyte.c')
-rw-r--r-- | src/mbyte.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index faeebfd83f..aa10d5e32b 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -3994,9 +3994,7 @@ utf_find_illegal(void) convert_setup(&vimconv, p_enc, curbuf->b_p_fenc); } -#ifdef FEAT_VIRTUALEDIT curwin->w_cursor.coladd = 0; -#endif for (;;) { p = ml_get_cursor(); @@ -4118,18 +4116,13 @@ mb_adjustpos(buf_T *buf, pos_T *lp) { char_u *p; - if (lp->col > 0 -#ifdef FEAT_VIRTUALEDIT - || lp->coladd > 1 -#endif - ) + if (lp->col > 0 || lp->coladd > 1) { p = ml_get_buf(buf, lp->lnum, FALSE); if (*p == NUL || (int)STRLEN(p) < lp->col) lp->col = 0; else lp->col -= (*mb_head_off)(p, p + lp->col); -#ifdef FEAT_VIRTUALEDIT /* Reset "coladd" when the cursor would be on the right half of a * double-wide character. */ if (lp->coladd == 1 @@ -4137,7 +4130,6 @@ mb_adjustpos(buf_T *buf, pos_T *lp) && vim_isprintc((*mb_ptr2char)(p + lp->col)) && ptr2cells(p + lp->col) > 1) lp->coladd = 0; -#endif } } |