summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-07-07 15:08:58 +0200
committerBram Moolenaar <Bram@vim.org>2011-07-07 15:08:58 +0200
commit03a807aaf45e5f85a10cd3b0c4e4913d170f8f5a (patch)
tree2a1889c39ffc1fcb52dd2950e9327fec7ee01648 /src/mbyte.c
parent5cfe2d760db119718287ad3d4ee11d6914ceee58 (diff)
downloadvim-git-03a807aaf45e5f85a10cd3b0c4e4913d170f8f5a.tar.gz
updated for version 7.3.239v7.3.239
Problem: Python corrects the cursor column without taking 'virtualedit' into account. (lilydjwg) Solution: Call check_cursor_col_win().
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index ce0c8975e..6e0dbf654 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -3563,7 +3563,7 @@ dbcs_screen_tail_off(base, p)
void
mb_adjust_cursor()
{
- mb_adjustpos(&curwin->w_cursor);
+ mb_adjustpos(curbuf, &curwin->w_cursor);
}
/*
@@ -3571,7 +3571,8 @@ mb_adjust_cursor()
* If it points to a tail byte it's moved backwards to the head byte.
*/
void
-mb_adjustpos(lp)
+mb_adjustpos(buf, lp)
+ buf_T *buf;
pos_T *lp;
{
char_u *p;
@@ -3582,7 +3583,7 @@ mb_adjustpos(lp)
#endif
)
{
- p = ml_get(lp->lnum);
+ p = ml_get_buf(buf, lp->lnum, FALSE);
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