|
Karsten Hopp |
cb6f7c |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
cb6f7c |
Subject: Patch 7.3.301
|
|
Karsten Hopp |
cb6f7c |
Fcc: outbox
|
|
Karsten Hopp |
cb6f7c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
cb6f7c |
Mime-Version: 1.0
|
|
Karsten Hopp |
cb6f7c |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
cb6f7c |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
cb6f7c |
------------
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
Patch 7.3.301
|
|
Karsten Hopp |
cb6f7c |
Problem: When 'smartindent' and 'copyindent' are set a Tab is used even
|
|
Karsten Hopp |
cb6f7c |
though 'expandtab' is set.
|
|
Karsten Hopp |
cb6f7c |
Solution: Do not insert Tabs. Add a test. (Christian Brabandt)
|
|
Karsten Hopp |
cb6f7c |
Files: src/misc1.c, src/testdir/test19.in, src/testdir/test19.ok
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
*** ../vim-7.3.300/src/misc1.c 2011-07-27 17:31:42.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
--- src/misc1.c 2011-09-07 19:37:04.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
***************
|
|
Karsten Hopp |
cb6f7c |
*** 363,369 ****
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
/* Fill to next tabstop with a tab, if possible */
|
|
Karsten Hopp |
cb6f7c |
tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
|
|
Karsten Hopp |
cb6f7c |
! if (todo >= tab_pad)
|
|
Karsten Hopp |
cb6f7c |
{
|
|
Karsten Hopp |
cb6f7c |
todo -= tab_pad;
|
|
Karsten Hopp |
cb6f7c |
++ind_len;
|
|
Karsten Hopp |
cb6f7c |
--- 363,369 ----
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
/* Fill to next tabstop with a tab, if possible */
|
|
Karsten Hopp |
cb6f7c |
tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
|
|
Karsten Hopp |
cb6f7c |
! if (todo >= tab_pad && !curbuf->b_p_et)
|
|
Karsten Hopp |
cb6f7c |
{
|
|
Karsten Hopp |
cb6f7c |
todo -= tab_pad;
|
|
Karsten Hopp |
cb6f7c |
++ind_len;
|
|
Karsten Hopp |
cb6f7c |
***************
|
|
Karsten Hopp |
cb6f7c |
*** 372,378 ****
|
|
Karsten Hopp |
cb6f7c |
}
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
/* Add tabs required for indent */
|
|
Karsten Hopp |
cb6f7c |
! while (todo >= (int)curbuf->b_p_ts)
|
|
Karsten Hopp |
cb6f7c |
{
|
|
Karsten Hopp |
cb6f7c |
todo -= (int)curbuf->b_p_ts;
|
|
Karsten Hopp |
cb6f7c |
++ind_len;
|
|
Karsten Hopp |
cb6f7c |
--- 372,378 ----
|
|
Karsten Hopp |
cb6f7c |
}
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
/* Add tabs required for indent */
|
|
Karsten Hopp |
cb6f7c |
! while (todo >= (int)curbuf->b_p_ts && !curbuf->b_p_et)
|
|
Karsten Hopp |
cb6f7c |
{
|
|
Karsten Hopp |
cb6f7c |
todo -= (int)curbuf->b_p_ts;
|
|
Karsten Hopp |
cb6f7c |
++ind_len;
|
|
Karsten Hopp |
cb6f7c |
*** ../vim-7.3.300/src/testdir/test19.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
--- src/testdir/test19.in 2011-09-07 19:46:17.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
***************
|
|
Karsten Hopp |
cb6f7c |
*** 12,17 ****
|
|
Karsten Hopp |
cb6f7c |
--- 12,20 ----
|
|
Karsten Hopp |
cb6f7c |
0wR ????
|
|
Karsten Hopp |
cb6f7c |
:" Test replacing with Tabs
|
|
Karsten Hopp |
cb6f7c |
0wR ?
|
|
Karsten Hopp |
cb6f7c |
+ :" Test that copyindent works with expandtab set
|
|
Karsten Hopp |
cb6f7c |
+ :set expandtab smartindent copyindent ts=8 sw=8 sts=8
|
|
Karsten Hopp |
cb6f7c |
+ :exe "norm! o{\<cr>x"
|
|
Karsten Hopp |
cb6f7c |
:?^start?,$w! test.out
|
|
Karsten Hopp |
cb6f7c |
:qa!
|
|
Karsten Hopp |
cb6f7c |
ENDTEST
|
|
Karsten Hopp |
cb6f7c |
*** ../vim-7.3.300/src/testdir/test19.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
--- src/testdir/test19.ok 2011-09-07 19:37:04.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
***************
|
|
Karsten Hopp |
cb6f7c |
*** 5,7 ****
|
|
Karsten Hopp |
cb6f7c |
--- 5,9 ----
|
|
Karsten Hopp |
cb6f7c |
a cde
|
|
Karsten Hopp |
cb6f7c |
hi
|
|
Karsten Hopp |
cb6f7c |
test text
|
|
Karsten Hopp |
cb6f7c |
+ {
|
|
Karsten Hopp |
cb6f7c |
+ x
|
|
Karsten Hopp |
cb6f7c |
*** ../vim-7.3.300/src/version.c 2011-09-07 19:30:17.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
--- src/version.c 2011-09-07 19:38:48.000000000 +0200
|
|
Karsten Hopp |
cb6f7c |
***************
|
|
Karsten Hopp |
cb6f7c |
*** 711,712 ****
|
|
Karsten Hopp |
cb6f7c |
--- 711,714 ----
|
|
Karsten Hopp |
cb6f7c |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
cb6f7c |
+ /**/
|
|
Karsten Hopp |
cb6f7c |
+ 301,
|
|
Karsten Hopp |
cb6f7c |
/**/
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
--
|
|
Karsten Hopp |
cb6f7c |
I recommend ordering large cargo containers of paper towels to make up
|
|
Karsten Hopp |
cb6f7c |
whatever budget underruns you have. Paper products are always useful and they
|
|
Karsten Hopp |
cb6f7c |
have the advantage of being completely flushable if you need to make room in
|
|
Karsten Hopp |
cb6f7c |
the storage area later.
|
|
Karsten Hopp |
cb6f7c |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
cb6f7c |
|
|
Karsten Hopp |
cb6f7c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
cb6f7c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
cb6f7c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
cb6f7c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|