To: vim-dev@vim.org Subject: Patch 6.3a.022 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.3a.022 Problem: When typing Tabs when 'softtabstop' is used and 'list' is set a tab is counted for two spaces. Solution: Use the "L" flag in 'cpoptions' to tell whether a tab is counted as two spaces or as 'tabstop'. (Antony Scriven) Files: runtime/doc/options.txt, src/edit.c *** ../vim-6.3a.021/runtime/doc/options.txt Fri May 7 10:59:27 2004 --- runtime/doc/options.txt Fri May 14 12:34:45 2004 *************** *** 1,4 **** ! *options.txt* For Vim version 6.3a. Last change: 2004 Apr 29 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *options.txt* For Vim version 6.3a. Last change: 2004 May 14 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 1663,1671 **** 'l' excluded: "/[ \t]" finds and *cpo-L* L When the 'list' option is set, 'wrapmargin', ! 'textwidth' and Virtual Replace mode (see |gR|) count ! a as two characters, instead of the normal ! behavior of a . *cpo-m* m When included, a showmatch will always wait half a second. When not included, a showmatch will wait half --- 1663,1671 ---- 'l' excluded: "/[ \t]" finds and *cpo-L* L When the 'list' option is set, 'wrapmargin', ! 'textwidth', 'softtabstop' and Virtual Replace mode ! (see |gR|) count a as two characters, instead of ! the normal behavior of a . *cpo-m* m When included, a showmatch will always wait half a second. When not included, a showmatch will wait half *************** *** 5430,5435 **** --- 5430,5437 ---- 'softtabstop' is set to 0 when the 'paste' option is set. See also |ins-expandtab|. When 'expandtab' is not set, the number of spaces is minimized by using s. + The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is + set. NOTE: This option is set to 0 when 'compatible' is set. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* *** ../vim-6.3a.021/src/edit.c Fri May 7 10:59:40 2004 --- src/edit.c Fri May 14 12:27:56 2004 *************** *** 7181,7186 **** --- 7181,7187 ---- pos_T *cursor; colnr_T want_vcol, vcol; int change_col = -1; + int save_list = curwin->w_p_list; /* * Get the current line. For VREPLACE mode, don't make real changes *************** *** 7203,7208 **** --- 7204,7213 ---- cursor = &curwin->w_cursor; } + /* When 'L' is not in 'cpoptions' a tab always takes up 'ts' spaces. */ + if (vim_strchr(p_cpo, CPO_LISTWM) == NULL) + curwin->w_p_list = FALSE; + /* Find first white before the cursor */ fpos = curwin->w_cursor; while (fpos.col > 0 && vim_iswhite(ptr[-1])) *************** *** 7305,7310 **** --- 7310,7316 ---- if (State & VREPLACE_FLAG) vim_free(saved_line); #endif + curwin->w_p_list = save_list; } return FALSE; *** ../vim-6.3a.021/src/version.c Fri May 14 12:46:36 2004 --- src/version.c Fri May 14 12:48:27 2004 *************** *** 643,644 **** --- 643,646 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- Not too long ago, unzipping in public was illegal... /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///