comparison src/testdir/test_bufline.vim @ 31255:87ff5e71d3c2 v9.0.0961

patch 9.0.0961: using deletebufline() may jump to another window Commit: https://github.com/vim/vim/commit/3da8597fc07505c0f8839b0834aafe1c10ffb456 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 27 19:45:49 2022 +0000 patch 9.0.0961: using deletebufline() may jump to another window Problem: Using deletebufline() may jump to another window. Solution: Do not use a window where the buffer was only in the past. (closes #11594)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Nov 2022 21:00:05 +0100
parents 7831da568864
children
comparison
equal deleted inserted replaced
31254:fac14d7d7c2b 31255:87ff5e71d3c2
286 286
287 exe "bwipe! " .. bufnr 287 exe "bwipe! " .. bufnr
288 bwipe! 288 bwipe!
289 endfunc 289 endfunc
290 290
291 func Test_deletebufline_popup_window()
292 let popupID = popup_create('foo', {})
293 let bufnr = winbufnr(popupID)
294
295 " Check that deletebufline() brings us back to the same window.
296 new
297 let winid_before = win_getid()
298 call deletebufline(bufnr, 1, '$')
299 call assert_equal(winid_before, win_getid())
300 bwipe
301
302 call popup_close(popupID)
303 endfunc
304
291 func Test_setbufline_startup_nofile() 305 func Test_setbufline_startup_nofile()
292 let before =<< trim [CODE] 306 let before =<< trim [CODE]
293 set shortmess+=F 307 set shortmess+=F
294 file Xresult 308 file Xresult
295 set buftype=nofile 309 set buftype=nofile