diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-02-20 19:26:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-02-20 19:26:29 +0100 |
commit | 558ddad8e836e0c6597c27eccc35275e7b4c4e6a (patch) | |
tree | cb986a4d9d230c44853d0baa90c5bf0d0d840e17 /src | |
parent | 187d3acb7fbb82266802db9dc3c659f8b725fbd0 (diff) | |
download | vim-git-558ddad8e836e0c6597c27eccc35275e7b4c4e6a.tar.gz |
updated for version 7.3.830v7.3.830
Problem: :mksession confuses bytes, columns and characters when positioning
the cursor.
Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 4c4c9e9bb..62ae3ad2e 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10829,24 +10829,24 @@ put_view(fd, wp, add_edit, flagp, current_arg_idx) { if (fprintf(fd, "let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)", - (long)wp->w_cursor.col, - (long)(wp->w_cursor.col - wp->w_leftcol), + (long)wp->w_virtcol + 1, + (long)(wp->w_virtcol - wp->w_leftcol), (long)wp->w_width / 2, (long)wp->w_width) < 0 || put_eol(fd) == FAIL || put_line(fd, "if s:c > 0") == FAIL || fprintf(fd, - " exe 'normal! 0' . s:c . 'lzs' . (%ld - s:c) . 'l'", - (long)wp->w_cursor.col) < 0 + " exe 'normal! ' . s:c . '|zs' . %ld . '|'", + (long)wp->w_virtcol + 1) < 0 || put_eol(fd) == FAIL || put_line(fd, "else") == FAIL - || fprintf(fd, " normal! 0%dl", wp->w_cursor.col) < 0 + || fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0 || put_eol(fd) == FAIL || put_line(fd, "endif") == FAIL) return FAIL; } else { - if (fprintf(fd, "normal! 0%dl", wp->w_cursor.col) < 0 + if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0 || put_eol(fd) == FAIL) return FAIL; } diff --git a/src/version.c b/src/version.c index a63e02554..0881d927c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 830, +/**/ 829, /**/ 828, |