From 26957915eb6d3a60f350b5ae6f2f8f57bb21f5f5 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Feb 27 2007 12:06:41 +0000 Subject: - patchlevel 199 --- diff --git a/7.0.199 b/7.0.199 new file mode 100644 index 0000000..16977da --- /dev/null +++ b/7.0.199 @@ -0,0 +1,67 @@ +To: vim-dev@vim.org +Subject: patch 7.0.199 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.0.199 +Problem: When using multi-byte characters the combination of completion and + formatting may result in a wrong cursor position. +Solution: Don't decrement the cursor column, use dec_cursor(). (Yukihiro + Nakadaira) Also check for the column to be zero. +Files: src/edit.c + + +*** ../vim-7.0.198/src/edit.c Sun Feb 4 02:37:40 2007 +--- src/edit.c Fri Feb 16 01:15:49 2007 +*************** +*** 3448,3458 **** + } + else + { + /* put the cursor on the last char, for 'tw' formatting */ +! curwin->w_cursor.col--; + if (stop_arrow() == OK) + insertchar(NUL, 0, -1); +! curwin->w_cursor.col++; + } + + auto_format(FALSE, TRUE); +--- 3449,3464 ---- + } + else + { ++ int prev_col = curwin->w_cursor.col; ++ + /* put the cursor on the last char, for 'tw' formatting */ +! if (prev_col > 0) +! dec_cursor(); + if (stop_arrow() == OK) + insertchar(NUL, 0, -1); +! if (prev_col > 0 +! && ml_get_curline()[curwin->w_cursor.col] != NUL) +! inc_cursor(); + } + + auto_format(FALSE, TRUE); +*** ../vim-7.0.198/src/version.c Tue Feb 20 03:18:20 2007 +--- src/version.c Tue Feb 20 03:32:12 2007 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 199, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +156. You forget your friend's name but not her e-mail address. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///