diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-06-16 11:55:40 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-16 11:55:40 +0200 | 
| commit | 4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d (patch) | |
| tree | 22e59e2f57c824369bd8d5f0d561f42303886229 /src/nvim/ops.c | |
| parent | c990d65c37ded9ad9f4002a6eb6ec36aa29b4fe3 (diff) | |
| parent | f419f914fc52fc86216b59e8ffa6fd510f79c6cd (diff) | |
| download | rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.gz rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.tar.bz2 rneovim-4c3c04d03cc0cdbccfb71b534fc3cd238fd3974d.zip  | |
Merge #8526 from janlazo/vim-8.0.0451
Diffstat (limited to 'src/nvim/ops.c')
| -rw-r--r-- | src/nvim/ops.c | 17 | 
1 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 45de76f80a..c95345f9b2 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -406,8 +406,9 @@ static void shift_block(oparg_T *oap, int amount)      /* If "bd.startspaces" is set, "bd.textstart" points to the character,       * the part of which is displayed at the block's beginning. Let's start       * searching from the next character. */ -    if (bd.startspaces) -      mb_ptr_adv(non_white); +    if (bd.startspaces) { +      MB_PTR_ADV(non_white); +    }      /* The character's column is in "bd.start_vcol".  */      non_white_col = bd.start_vcol; @@ -443,7 +444,7 @@ static void shift_block(oparg_T *oap, int amount)        if (verbatim_copy_width + incr > destination_col)          break;        verbatim_copy_width += incr; -      mb_ptr_adv(verbatim_copy_end); +      MB_PTR_ADV(verbatim_copy_end);      }      /* If "destination_col" is different from the width of the initial @@ -2820,7 +2821,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)        }        char_u *p = get_cursor_pos_ptr();        if (dir == FORWARD && *p != NUL) { -        mb_ptr_adv(p); +        MB_PTR_ADV(p);        }        ptr = vim_strsave(p);        ml_append(curwin->w_cursor.lnum, ptr, (colnr_T)0, false); @@ -2829,7 +2830,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)        oldp = get_cursor_line_ptr();        p = oldp + curwin->w_cursor.col;        if (dir == FORWARD && *p != NUL) { -        mb_ptr_adv(p); +        MB_PTR_ADV(p);        }        ptr = vim_strnsave(oldp, (size_t)(p - oldp));        ml_replace(curwin->w_cursor.lnum, ptr, false); @@ -3632,10 +3633,10 @@ int do_join(size_t count,      if (insert_space && currsize > 0) {        if (has_mbyte) {          cend = curr + currsize; -        mb_ptr_back(curr, cend); +        MB_PTR_BACK(curr, cend);          endcurr1 = (*mb_ptr2char)(cend);          if (cend > curr) { -          mb_ptr_back(curr, cend); +          MB_PTR_BACK(curr, cend);            endcurr2 = (*mb_ptr2char)(cend);          }        } else { @@ -4272,7 +4273,7 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, int i        bdp->pre_whitesp_c = 0;      }      prev_pstart = pstart; -    mb_ptr_adv(pstart); +    MB_PTR_ADV(pstart);    }    bdp->start_char_vcols = incr;    if (bdp->start_vcol < oap->start_vcol) {      /* line too short */  | 
