diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-11-03 15:44:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-11-03 15:44:21 +0000 |
commit | a1381de5f372f404180d896389dae1aaec02875d (patch) | |
tree | db75f8a38f6e354543253d374047410435696f8f /src | |
parent | 5b88ba47e818130b3499278c176e8921de8fc550 (diff) | |
download | vim-git-a1381de5f372f404180d896389dae1aaec02875d.tar.gz |
updated for version 7.2-279v7.2.279
Diffstat (limited to 'src')
-rw-r--r-- | src/misc2.c | 6 | ||||
-rw-r--r-- | src/ops.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/misc2.c b/src/misc2.c index 05379931c..5fc64bb8f 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -156,7 +156,7 @@ coladvance2(pos, addspaces, finetune, wcol) || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) #endif ; - line = ml_get_curline(); + line = ml_get_buf(curbuf, pos->lnum, FALSE); if (wcol >= MAXCOL) { @@ -332,9 +332,9 @@ coladvance2(pos, addspaces, finetune, wcol) #endif #ifdef FEAT_MBYTE - /* prevent cursor from moving on the trail byte */ + /* prevent from moving onto a trail byte */ if (has_mbyte) - mb_adjust_cursor(); + mb_adjustpos(pos); #endif if (col < wcol) @@ -2020,6 +2020,7 @@ op_replace(oap, c) bd.is_MAX = (curwin->w_curswant == MAXCOL); for ( ; curwin->w_cursor.lnum <= oap->end.lnum; ++curwin->w_cursor.lnum) { + curwin->w_cursor.col = 0; /* make sure cursor position is valid */ block_prep(oap, &bd, curwin->w_cursor.lnum, TRUE); if (bd.textlen == 0 && (!virtual_op || bd.is_MAX)) continue; /* nothing to replace */ @@ -2035,6 +2036,7 @@ op_replace(oap, c) { pos_T vpos; + vpos.lnum = curwin->w_cursor.lnum; getvpos(&vpos, oap->start_vcol); bd.startspaces += vpos.coladd; n = bd.startspaces; @@ -2693,11 +2695,8 @@ op_change(oap) * initial coladd offset as part of "startspaces" */ if (bd.is_short) { - linenr_T lnum = curwin->w_cursor.lnum; - - curwin->w_cursor.lnum = linenr; + vpos.lnum = linenr; (void)getvpos(&vpos, oap->start_vcol); - curwin->w_cursor.lnum = lnum; } else vpos.coladd = 0; diff --git a/src/version.c b/src/version.c index 9edf072d2..80bdb240b 100644 --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 279, +/**/ 278, /**/ 277, |