]>
Commit | Line | Data |
---|---|---|
f000913c | 1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.280 | |
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.280 | |
11 | Problem: ":lmake" does not update the quickfix window title. | |
12 | Solution: Update the title. (Lech Lorens) | |
13 | Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok | |
14 | ||
15 | ||
16 | *** ../vim-7.3.279/src/quickfix.c 2011-08-10 13:21:30.000000000 +0200 | |
17 | --- src/quickfix.c 2011-08-10 18:09:19.000000000 +0200 | |
18 | *************** | |
19 | *** 126,131 **** | |
20 | --- 126,132 ---- | |
21 | static win_T *qf_find_win __ARGS((qf_info_T *qi)); | |
22 | static buf_T *qf_find_buf __ARGS((qf_info_T *qi)); | |
23 | static void qf_update_buffer __ARGS((qf_info_T *qi)); | |
24 | + static void qf_set_title __ARGS((qf_info_T *qi)); | |
25 | static void qf_fill_buffer __ARGS((qf_info_T *qi)); | |
26 | #endif | |
27 | static char_u *get_mef_name __ARGS((void)); | |
28 | *************** | |
29 | *** 2388,2395 **** | |
30 | qf_fill_buffer(qi); | |
31 | ||
32 | if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) | |
33 | ! set_internal_string_var((char_u *)"w:quickfix_title", | |
34 | ! qi->qf_lists[qi->qf_curlist].qf_title); | |
35 | ||
36 | curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; | |
37 | curwin->w_cursor.col = 0; | |
38 | --- 2389,2395 ---- | |
39 | qf_fill_buffer(qi); | |
40 | ||
41 | if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) | |
42 | ! qf_set_title(qi); | |
43 | ||
44 | curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; | |
45 | curwin->w_cursor.col = 0; | |
46 | *************** | |
47 | *** 2526,2531 **** | |
48 | --- 2526,2533 ---- | |
49 | qf_info_T *qi; | |
50 | { | |
51 | buf_T *buf; | |
52 | + win_T *win; | |
53 | + win_T *curwin_save; | |
54 | aco_save_T aco; | |
55 | ||
56 | /* Check if a buffer for the quickfix list exists. Update it. */ | |
57 | *************** | |
58 | *** 2537,2542 **** | |
59 | --- 2539,2554 ---- | |
60 | ||
61 | qf_fill_buffer(qi); | |
62 | ||
63 | + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL | |
64 | + && (win = qf_find_win(qi)) != NULL) | |
65 | + { | |
66 | + curwin_save = curwin; | |
67 | + curwin = win; | |
68 | + qf_set_title(qi); | |
69 | + curwin = curwin_save; | |
70 | + | |
71 | + } | |
72 | + | |
73 | /* restore curwin/curbuf and a few other things */ | |
74 | aucmd_restbuf(&aco); | |
75 | ||
76 | *************** | |
77 | *** 2544,2549 **** | |
78 | --- 2556,2569 ---- | |
79 | } | |
80 | } | |
81 | ||
82 | + static void | |
83 | + qf_set_title(qi) | |
84 | + qf_info_T *qi; | |
85 | + { | |
86 | + set_internal_string_var((char_u *)"w:quickfix_title", | |
87 | + qi->qf_lists[qi->qf_curlist].qf_title); | |
88 | + } | |
89 | + | |
90 | /* | |
91 | * Fill current buffer with quickfix errors, replacing any previous contents. | |
92 | * curbuf must be the quickfix buffer! | |
93 | *** ../vim-7.3.279/src/testdir/test10.in 2011-08-10 13:21:30.000000000 +0200 | |
94 | --- src/testdir/test10.in 2011-08-10 18:28:31.000000000 +0200 | |
95 | *************** | |
96 | *** 5,13 **** | |
97 | :" Also test a BOM is ignored. | |
98 | :so mbyte.vim | |
99 | :set encoding=utf-8 | |
100 | ! :/start of errorfile/,/end of errorfile/w! Xerrorfile | |
101 | :/start of testfile/,/end of testfile/w! Xtestfile | |
102 | ! :cf Xerrorfile | |
103 | rA | |
104 | :cn | |
105 | rB | |
106 | --- 5,20 ---- | |
107 | :" Also test a BOM is ignored. | |
108 | :so mbyte.vim | |
109 | :set encoding=utf-8 | |
110 | ! :7/start of errorfile/,/end of errorfile/w! Xerrorfile1 | |
111 | ! :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 | |
112 | :/start of testfile/,/end of testfile/w! Xtestfile | |
113 | ! :cf Xerrorfile2 | |
114 | ! :clast | |
115 | ! :copen | |
116 | ! :let a=w:quickfix_title | |
117 | ! :wincmd p | |
ad3f3e5b | 118 | ! gR\12=a\e |
f000913c | 119 | ! :cf Xerrorfile1 |
120 | rA | |
121 | :cn | |
122 | rB | |
123 | *************** | |
124 | *** 17,22 **** | |
125 | --- 24,34 ---- | |
126 | rD | |
127 | :cn | |
128 | rE | |
129 | + :cn | |
130 | + :wincmd w | |
131 | + :let a=w:quickfix_title | |
132 | + :wincmd p | |
ad3f3e5b | 133 | + gR\12=a\e |
f000913c | 134 | :w! test.out " Write contents of this file |
135 | :qa! | |
136 | ENDTEST | |
137 | *************** | |
138 | *** 33,38 **** | |
139 | --- 45,52 ---- | |
140 | "Xtestfile", linenr 19: yet another problem | |
141 | ||
142 | Does anyone know what is the problem and how to correction it? | |
143 | + "Xtestfile", line 21 col 9: What is the title of the quickfix window? | |
144 | + "Xtestfile", line 22 col 9: What is the title of the quickfix window? | |
145 | end of errorfile | |
146 | ||
147 | start of testfile | |
148 | *** ../vim-7.3.279/src/testdir/test10.ok 2010-08-15 21:57:29.000000000 +0200 | |
149 | --- src/testdir/test10.ok 2011-08-10 18:03:53.000000000 +0200 | |
150 | *************** | |
151 | *** 18,23 **** | |
152 | line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
153 | Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
154 | line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
155 | ! line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
156 | ! line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
157 | end of testfile | |
158 | --- 18,23 ---- | |
159 | line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
160 | Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
161 | line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
162 | ! line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx | |
163 | ! line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx | |
164 | end of testfile | |
165 | *** ../vim-7.3.279/src/version.c 2011-08-10 17:44:41.000000000 +0200 | |
166 | --- src/version.c 2011-08-10 18:35:52.000000000 +0200 | |
167 | *************** | |
168 | *** 711,712 **** | |
169 | --- 711,714 ---- | |
170 | { /* Add new patch number below this line */ | |
171 | + /**/ | |
172 | + 280, | |
173 | /**/ | |
174 | ||
175 | -- | |
176 | "When I die, I want a tombstone that says "GAME OVER" - Ton Richters | |
177 | ||
178 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
179 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
180 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
181 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |