From 2934c1d7059fc6fef358fa7685a243c7515eb869 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Dec 22 2007 22:14:24 +0000 Subject: - patchlevel 175 --- diff --git a/7.1.175 b/7.1.175 new file mode 100644 index 0000000..3ec00fd --- /dev/null +++ b/7.1.175 @@ -0,0 +1,179 @@ +To: vim-dev@vim.org +Subject: Patch 7.1.175 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.1.175 +Problem: doesn't work with some combination of 'sts', 'linebreak' and + 'backspace'. (Francois Ingelrest) +Solution: When adding white space results in not moving back delete one + character. +Files: src/edit.c + + +*** ../vim-7.1.174/src/edit.c Sat Nov 24 21:27:33 2007 +--- src/edit.c Fri Dec 7 21:32:48 2007 +*************** +*** 8189,8194 **** +--- 8189,8217 ---- + AppendCharToRedobuff(K_DEL); + } + ++ static void ins_bs_one __ARGS((colnr_T *vcolp)); ++ ++ /* ++ * Delete one character for ins_bs(). ++ */ ++ static void ++ ins_bs_one(vcolp) ++ colnr_T *vcolp; ++ { ++ dec_cursor(); ++ getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL); ++ if (State & REPLACE_FLAG) ++ { ++ /* Don't delete characters before the insert point when in ++ * Replace mode */ ++ if (curwin->w_cursor.lnum != Insstart.lnum ++ || curwin->w_cursor.col >= Insstart.col) ++ replace_do_bs(); ++ } ++ else ++ (void)del_char(FALSE); ++ } ++ + /* + * Handle Backspace, delete-word and delete-line in Insert mode. + * Return TRUE when backspace was actually used. +*************** +*** 8418,8426 **** + int ts; + colnr_T vcol; + colnr_T want_vcol; +! #if 0 +! int extra = 0; +! #endif + + *inserted_space_p = FALSE; + if (p_sta && in_indent) +--- 8441,8447 ---- + int ts; + colnr_T vcol; + colnr_T want_vcol; +! colnr_T start_vcol; + + *inserted_space_p = FALSE; + if (p_sta && in_indent) +*************** +*** 8431,8436 **** +--- 8452,8458 ---- + * 'showbreak' may get in the way, need to get the last column of + * the previous character. */ + getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); ++ start_vcol = vcol; + dec_cursor(); + getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); + inc_cursor(); +*************** +*** 8439,8468 **** + /* delete characters until we are at or before want_vcol */ + while (vcol > want_vcol + && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc))) +! { +! dec_cursor(); +! getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); +! if (State & REPLACE_FLAG) +! { +! /* Don't delete characters before the insert point when in +! * Replace mode */ +! if (curwin->w_cursor.lnum != Insstart.lnum +! || curwin->w_cursor.col >= Insstart.col) +! { +! #if 0 /* what was this for? It causes problems when sw != ts. */ +! if (State == REPLACE && (int)vcol < want_vcol) +! { +! (void)del_char(FALSE); +! extra = 2; /* don't pop too much */ +! } +! else +! #endif +! replace_do_bs(); +! } +! } +! else +! (void)del_char(FALSE); +! } + + /* insert extra spaces until we are at want_vcol */ + while (vcol < want_vcol) +--- 8461,8467 ---- + /* delete characters until we are at or before want_vcol */ + while (vcol > want_vcol + && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc))) +! ins_bs_one(&vcol); + + /* insert extra spaces until we are at want_vcol */ + while (vcol < want_vcol) +*************** +*** 8479,8500 **** + #endif + { + ins_str((char_u *)" "); +! if ((State & REPLACE_FLAG) /* && extra <= 1 */) +! { +! #if 0 +! if (extra) +! replace_push_off(NUL); +! else +! #endif +! replace_push(NUL); +! } +! #if 0 +! if (extra == 2) +! extra = 1; +! #endif + } + getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); + } + } + + /* +--- 8478,8493 ---- + #endif + { + ins_str((char_u *)" "); +! if ((State & REPLACE_FLAG)) +! replace_push(NUL); + } + getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); + } ++ ++ /* If we are now back where we started delete one character. Can ++ * happen when using 'sts' and 'linebreak'. */ ++ if (vcol >= start_vcol) ++ ins_bs_one(&vcol); + } + + /* +*** ../vim-7.1.174/src/version.c Sun Dec 9 19:37:37 2007 +--- src/version.c Sun Dec 9 20:24:11 2007 +*************** +*** 668,669 **** +--- 668,671 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 175, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +215. Your mouse-clicking forearm rivals Popeye's. + + /// 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 /// diff --git a/README.patches b/README.patches index 0a8deae..4c8f94e 100644 --- a/README.patches +++ b/README.patches @@ -188,3 +188,19 @@ Individual patches for Vim 7.1: 1541 7.1.157 :" in Ex mode at end of file results in an error message 4629 7.1.158 (extra) Win32: with utf-8 and cp1250 Alt-y is the wrong char 1646 7.1.159 overlapping arguments for a strcpy() + 1661 7.1.160 getting/losing focus may cause hit-enter prompt to be redrawn + 4347 7.1.161 compilation errors with tiny features and EXITFREE + 4691 7.1.162 crash when using a modifier before "while" or "for" + 2367 7.1.163 warning for the unknown option 'bufsecret' + 1576 7.1.164 reading past end of regexp pattern + 5538 7.1.165 crash related to getting X window ID + 2134 7.1.166 memory leak when using "gp" in Visual mode + 2528 7.1.167 xxd crashes when using "xxd -b -c 110" + 2989 7.1.168 (extra) Win32 GUI: when no focus click doesn't position cursor + 1926 7.1.169 using uninitialized memory when system() fails + 1722 7.1.170 overlapping arguments to strcpy() + 2324 7.1.171 reading one byte before allocated memory. + 1536 7.1.172 if 'buftype' is "acwrite" Vim still does overwrite check + 1928 7.1.173 accessing freed memory when using "\%^" pattern + 2197 7.1.174 writing NUL past end of a buffer + 4722 7.1.175 doesn't work with some combination of option settings diff --git a/vim.spec b/vim.spec index 6df1bb2..9983d68 100644 --- a/vim.spec +++ b/vim.spec @@ -15,7 +15,7 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim71%{?beta} -%define patchlevel 159 +%define patchlevel 175 Summary: The VIM editor URL: http://www.vim.org/ @@ -210,6 +210,22 @@ Patch156: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.156 Patch157: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.157 Patch158: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.158 Patch159: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.159 +Patch160: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.160 +Patch161: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.161 +Patch162: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.162 +Patch163: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.163 +Patch164: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.164 +Patch165: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.165 +Patch166: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.166 +Patch167: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.167 +Patch168: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.168 +Patch169: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.169 +Patch170: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.170 +Patch171: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.171 +Patch172: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.172 +Patch173: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.173 +Patch174: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.174 +Patch175: ftp://ftp.vim.org/pub/vim/patches/7.1/7.1.175 Patch3000: vim-7.0-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -501,6 +517,22 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch157 -p0 %patch158 -p0 %patch159 -p0 +%patch160 -p0 +%patch161 -p0 +%patch162 -p0 +%patch163 -p0 +%patch164 -p0 +%patch165 -p0 +%patch166 -p0 +%patch167 -p0 +%patch168 -p0 +%patch169 -p0 +%patch170 -p0 +%patch171 -p0 +%patch172 -p0 +%patch173 -p0 +%patch174 -p0 +%patch175 -p0 # install spell files @@ -887,6 +919,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Sat Dec 22 2007 Karsten Hopp 7.1.%{nil}175-1 +- patchlevel 175 + * Thu Nov 22 2007 Karsten Hopp 7.1.159-1 - patchlevel 159 - vim-enhanced requires which for vimtutor (#395371)