|
Karsten Hopp |
dd7ab9 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
dd7ab9 |
Subject: Patch 7.3.830
|
|
Karsten Hopp |
dd7ab9 |
Fcc: outbox
|
|
Karsten Hopp |
dd7ab9 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
dd7ab9 |
Mime-Version: 1.0
|
|
Karsten Hopp |
dd7ab9 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
dd7ab9 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
dd7ab9 |
------------
|
|
Karsten Hopp |
dd7ab9 |
|
|
Karsten Hopp |
dd7ab9 |
Patch 7.3.830
|
|
Karsten Hopp |
dd7ab9 |
Problem: :mksession confuses bytes, columns and characters when positioning
|
|
Karsten Hopp |
dd7ab9 |
the cursor.
|
|
Karsten Hopp |
dd7ab9 |
Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
|
|
Karsten Hopp |
dd7ab9 |
Files: src/ex_docmd.c
|
|
Karsten Hopp |
dd7ab9 |
|
|
Karsten Hopp |
dd7ab9 |
|
|
Karsten Hopp |
dd7ab9 |
*** ../vim-7.3.829/src/ex_docmd.c 2013-02-14 22:11:31.000000000 +0100
|
|
Karsten Hopp |
dd7ab9 |
--- src/ex_docmd.c 2013-02-20 19:13:21.000000000 +0100
|
|
Karsten Hopp |
dd7ab9 |
***************
|
|
Karsten Hopp |
dd7ab9 |
*** 10829,10852 ****
|
|
Karsten Hopp |
dd7ab9 |
{
|
|
Karsten Hopp |
dd7ab9 |
if (fprintf(fd,
|
|
Karsten Hopp |
dd7ab9 |
"let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)",
|
|
Karsten Hopp |
dd7ab9 |
! (long)wp->w_cursor.col,
|
|
Karsten Hopp |
dd7ab9 |
! (long)(wp->w_cursor.col - wp->w_leftcol),
|
|
Karsten Hopp |
dd7ab9 |
(long)wp->w_width / 2, (long)wp->w_width) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "if s:c > 0") == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| fprintf(fd,
|
|
Karsten Hopp |
dd7ab9 |
! " exe 'normal! 0' . s:c . 'lzs' . (%ld - s:c) . 'l'",
|
|
Karsten Hopp |
dd7ab9 |
! (long)wp->w_cursor.col) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "else") == FAIL
|
|
Karsten Hopp |
dd7ab9 |
! || fprintf(fd, " normal! 0%dl", wp->w_cursor.col) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "endif") == FAIL)
|
|
Karsten Hopp |
dd7ab9 |
return FAIL;
|
|
Karsten Hopp |
dd7ab9 |
}
|
|
Karsten Hopp |
dd7ab9 |
else
|
|
Karsten Hopp |
dd7ab9 |
{
|
|
Karsten Hopp |
dd7ab9 |
! if (fprintf(fd, "normal! 0%dl", wp->w_cursor.col) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL)
|
|
Karsten Hopp |
dd7ab9 |
return FAIL;
|
|
Karsten Hopp |
dd7ab9 |
}
|
|
Karsten Hopp |
dd7ab9 |
--- 10829,10852 ----
|
|
Karsten Hopp |
dd7ab9 |
{
|
|
Karsten Hopp |
dd7ab9 |
if (fprintf(fd,
|
|
Karsten Hopp |
dd7ab9 |
"let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)",
|
|
Karsten Hopp |
dd7ab9 |
! (long)wp->w_virtcol + 1,
|
|
Karsten Hopp |
dd7ab9 |
! (long)(wp->w_virtcol - wp->w_leftcol),
|
|
Karsten Hopp |
dd7ab9 |
(long)wp->w_width / 2, (long)wp->w_width) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "if s:c > 0") == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| fprintf(fd,
|
|
Karsten Hopp |
dd7ab9 |
! " exe 'normal! ' . s:c . '|zs' . %ld . '|'",
|
|
Karsten Hopp |
dd7ab9 |
! (long)wp->w_virtcol + 1) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "else") == FAIL
|
|
Karsten Hopp |
dd7ab9 |
! || fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL
|
|
Karsten Hopp |
dd7ab9 |
|| put_line(fd, "endif") == FAIL)
|
|
Karsten Hopp |
dd7ab9 |
return FAIL;
|
|
Karsten Hopp |
dd7ab9 |
}
|
|
Karsten Hopp |
dd7ab9 |
else
|
|
Karsten Hopp |
dd7ab9 |
{
|
|
Karsten Hopp |
dd7ab9 |
! if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0
|
|
Karsten Hopp |
dd7ab9 |
|| put_eol(fd) == FAIL)
|
|
Karsten Hopp |
dd7ab9 |
return FAIL;
|
|
Karsten Hopp |
dd7ab9 |
}
|
|
Karsten Hopp |
dd7ab9 |
*** ../vim-7.3.829/src/version.c 2013-02-20 18:39:07.000000000 +0100
|
|
Karsten Hopp |
dd7ab9 |
--- src/version.c 2013-02-20 19:14:18.000000000 +0100
|
|
Karsten Hopp |
dd7ab9 |
***************
|
|
Karsten Hopp |
dd7ab9 |
*** 730,731 ****
|
|
Karsten Hopp |
dd7ab9 |
--- 730,733 ----
|
|
Karsten Hopp |
dd7ab9 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
dd7ab9 |
+ /**/
|
|
Karsten Hopp |
dd7ab9 |
+ 830,
|
|
Karsten Hopp |
dd7ab9 |
/**/
|
|
Karsten Hopp |
dd7ab9 |
|
|
Karsten Hopp |
dd7ab9 |
--
|
|
Karsten Hopp |
dd7ab9 |
Westheimer's Discovery:
|
|
Karsten Hopp |
dd7ab9 |
A couple of months in the laboratory can
|
|
Karsten Hopp |
dd7ab9 |
frequently save a couple of hours in the library.
|
|
Karsten Hopp |
dd7ab9 |
|
|
Karsten Hopp |
dd7ab9 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
dd7ab9 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
dd7ab9 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
dd7ab9 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|