]>
Commit | Line | Data |
---|---|---|
59ab3540 AM |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.301 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.301 | |
11 | Problem: When 'smartindent' and 'copyindent' are set a Tab is used even | |
12 | though 'expandtab' is set. | |
13 | Solution: Do not insert Tabs. Add a test. (Christian Brabandt) | |
14 | Files: src/misc1.c, src/testdir/test19.in, src/testdir/test19.ok | |
15 | ||
16 | ||
17 | *** ../vim-7.3.300/src/misc1.c 2011-07-27 17:31:42.000000000 +0200 | |
18 | --- src/misc1.c 2011-09-07 19:37:04.000000000 +0200 | |
19 | *************** | |
20 | *** 363,369 **** | |
21 | ||
22 | /* Fill to next tabstop with a tab, if possible */ | |
23 | tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts); | |
24 | ! if (todo >= tab_pad) | |
25 | { | |
26 | todo -= tab_pad; | |
27 | ++ind_len; | |
28 | --- 363,369 ---- | |
29 | ||
30 | /* Fill to next tabstop with a tab, if possible */ | |
31 | tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts); | |
32 | ! if (todo >= tab_pad && !curbuf->b_p_et) | |
33 | { | |
34 | todo -= tab_pad; | |
35 | ++ind_len; | |
36 | *************** | |
37 | *** 372,378 **** | |
38 | } | |
39 | ||
40 | /* Add tabs required for indent */ | |
41 | ! while (todo >= (int)curbuf->b_p_ts) | |
42 | { | |
43 | todo -= (int)curbuf->b_p_ts; | |
44 | ++ind_len; | |
45 | --- 372,378 ---- | |
46 | } | |
47 | ||
48 | /* Add tabs required for indent */ | |
49 | ! while (todo >= (int)curbuf->b_p_ts && !curbuf->b_p_et) | |
50 | { | |
51 | todo -= (int)curbuf->b_p_ts; | |
52 | ++ind_len; | |
53 | *** ../vim-7.3.300/src/testdir/test19.in 2010-08-15 21:57:29.000000000 +0200 | |
54 | --- src/testdir/test19.in 2011-09-07 19:46:17.000000000 +0200 | |
55 | *************** | |
56 | *** 12,17 **** | |
57 | --- 12,20 ---- | |
58 | 0wR \b\b\b\e | |
59 | :" Test replacing with Tabs | |
60 | 0wR \e | |
61 | + :" Test that copyindent works with expandtab set | |
62 | + :set expandtab smartindent copyindent ts=8 sw=8 sts=8 | |
63 | + :exe "norm! o{\<cr>x" | |
64 | :?^start?,$w! test.out | |
65 | :qa! | |
66 | ENDTEST | |
67 | *** ../vim-7.3.300/src/testdir/test19.ok 2010-08-15 21:57:29.000000000 +0200 | |
68 | --- src/testdir/test19.ok 2011-09-07 19:37:04.000000000 +0200 | |
69 | *************** | |
70 | *** 5,7 **** | |
71 | --- 5,9 ---- | |
72 | a cde | |
73 | hi | |
74 | test text | |
75 | + { | |
76 | + x | |
77 | *** ../vim-7.3.300/src/version.c 2011-09-07 19:30:17.000000000 +0200 | |
78 | --- src/version.c 2011-09-07 19:38:48.000000000 +0200 | |
79 | *************** | |
80 | *** 711,712 **** | |
81 | --- 711,714 ---- | |
82 | { /* Add new patch number below this line */ | |
83 | + /**/ | |
84 | + 301, | |
85 | /**/ | |
86 | ||
87 | -- | |
88 | I recommend ordering large cargo containers of paper towels to make up | |
89 | whatever budget underruns you have. Paper products are always useful and they | |
90 | have the advantage of being completely flushable if you need to make room in | |
91 | the storage area later. | |
92 | (Scott Adams - The Dilbert principle) | |
93 | ||
94 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
95 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
96 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
97 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |