comparison src/testdir/test_popupwin.vim @ 16843:283037126560 v8.1.1423

patch 8.1.1423: popup windows use options from current window and buffer commit https://github.com/vim/vim/commit/cacc6a5c986fbc716bf53b6916f076dd7b388142 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 30 15:22:43 2019 +0200 patch 8.1.1423: popup windows use options from current window and buffer Problem: Popup windows use options from current window and buffer. Solution: Clear all local options when creating a popup window.
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 May 2019 15:30:05 +0200
parents cf630fab9fb6
children 629f3d3b6886
comparison
equal deleted inserted replaced
16842:a3555dcb63cd 16843:283037126560
262 call assert_equal(0, res.time) 262 call assert_equal(0, res.time)
263 endif 263 endif
264 call popup_close(winid) 264 call popup_close(winid)
265 call assert_equal({}, popup_getoptions(winid)) 265 call assert_equal({}, popup_getoptions(winid))
266 endfunc 266 endfunc
267
268 func Test_popup_option_values()
269 new
270 " window-local
271 setlocal number
272 setlocal nowrap
273 " buffer-local
274 setlocal omnifunc=Something
275 " global/buffer-local
276 setlocal path=/there
277 " global/window-local
278 setlocal scrolloff=9
279
280 let winid = popup_create('hello', {})
281 call assert_equal(0, getwinvar(winid, '&number'))
282 call assert_equal(1, getwinvar(winid, '&wrap'))
283 call assert_equal('', getwinvar(winid, '&omnifunc'))
284 call assert_equal(&g:path, getwinvar(winid, '&path'))
285 call assert_equal(&g:scrolloff, getwinvar(winid, '&scrolloff'))
286
287 call popup_close(winid)
288 bwipe
289 endfunc