Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17644:daa1dea1c1b3 v8.1.1819
patch 8.1.1819: :pedit does not work with a popup preview window
commit https://github.com/vim/vim/commit/1b6d9c4215a56f3dda4df6e05d655c853551ffbd
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 5 21:52:04 2019 +0200
patch 8.1.1819: :pedit does not work with a popup preview window
Problem: :pedit does not work with a popup preview window.
Solution: Avoid aborting with an error. (fixes https://github.com/vim/vim/issues/4777) Also double check
that after prepare_tagpreview() the current window is not a
popup window.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Aug 2019 22:00:06 +0200 |
parents | 6e6a84993444 |
children | 55704f587945 |
comparison
equal
deleted
inserted
replaced
17643:dfc6ba5db4ec | 17644:daa1dea1c1b3 |
---|---|
2172 \ + ['theword is here'] | 2172 \ + ['theword is here'] |
2173 \ + range(22, 27) | 2173 \ + range(22, 27) |
2174 \ + ['this is another place'] | 2174 \ + ['this is another place'] |
2175 \ + range(29, 40), | 2175 \ + range(29, 40), |
2176 \ "Xtagfile") | 2176 \ "Xtagfile") |
2177 call writefile(range(1,10) | |
2178 \ + ['searched word is here'] | |
2179 \ + range(12, 20), | |
2180 \ "Xheader.h") | |
2177 let lines =<< trim END | 2181 let lines =<< trim END |
2178 set tags=Xtags | 2182 set tags=Xtags |
2179 call setline(1, [ | 2183 call setline(1, [ |
2180 \ 'one', | 2184 \ 'one', |
2181 \ 'two', | 2185 \ '#include "Xheader.h"', |
2182 \ 'three', | 2186 \ 'three', |
2183 \ 'four', | 2187 \ 'four', |
2184 \ 'five', | 2188 \ 'five', |
2185 \ 'six', | 2189 \ 'six', |
2186 \ 'seven', | 2190 \ 'seven', |
2187 \ 'find theword somewhere', | 2191 \ 'find theword somewhere', |
2188 \ 'nine', | 2192 \ 'nine', |
2189 \ 'this is another word', | 2193 \ 'this is another word', |
2190 \ 'very long line where the word is also another']) | 2194 \ 'very long line where the word is also another']) |
2191 set previewpopup=height:4,width:40 | 2195 set previewpopup=height:4,width:40 |
2196 set path=. | |
2197 call ch_logfile('logfile', 'w') | |
2198 call ch_log('logfile started') | |
2192 END | 2199 END |
2193 call writefile(lines, 'XtestPreviewPopup') | 2200 call writefile(lines, 'XtestPreviewPopup') |
2194 let buf = RunVimInTerminal('-S XtestPreviewPopup', #{rows: 14}) | 2201 let buf = RunVimInTerminal('-S XtestPreviewPopup', #{rows: 14}) |
2195 | 2202 |
2196 call term_sendkeys(buf, "/theword\<CR>\<C-W>}") | 2203 call term_sendkeys(buf, "/theword\<CR>\<C-W>}") |
2207 call term_sendkeys(buf, "/another\<CR>\<C-W>}") | 2214 call term_sendkeys(buf, "/another\<CR>\<C-W>}") |
2208 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_4', {}) | 2215 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_4', {}) |
2209 | 2216 |
2210 call term_sendkeys(buf, ":cd ..\<CR>:\<CR>") | 2217 call term_sendkeys(buf, ":cd ..\<CR>:\<CR>") |
2211 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_5', {}) | 2218 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_5', {}) |
2219 call term_sendkeys(buf, ":cd testdir\<CR>") | |
2220 | |
2221 call term_sendkeys(buf, ":pclose\<CR>") | |
2222 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_6', {}) | |
2223 | |
2224 call term_sendkeys(buf, ":pedit +/theword Xtagfile\<CR>") | |
2225 call term_sendkeys(buf, ":\<CR>") | |
2226 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_7', {}) | |
2227 | |
2228 call term_sendkeys(buf, ":pclose\<CR>") | |
2229 call term_sendkeys(buf, ":psearch searched\<CR>") | |
2230 call term_sendkeys(buf, ":\<CR>") | |
2231 call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_8', {}) | |
2212 | 2232 |
2213 call StopVimInTerminal(buf) | 2233 call StopVimInTerminal(buf) |
2214 call delete('Xtags') | 2234 call delete('Xtags') |
2215 call delete('Xtagfile') | 2235 call delete('Xtagfile') |
2216 call delete('XtestPreviewPopup') | 2236 call delete('XtestPreviewPopup') |
2237 call delete('Xheader.h') | |
2217 endfunc | 2238 endfunc |
2218 | 2239 |
2219 " vim: shiftwidth=2 sts=2 | 2240 " vim: shiftwidth=2 sts=2 |