comparison src/testdir/test_popupwin.vim @ 22675:ff29f22c93f7 v8.2.1886

patch 8.2.1886: using ":silent!" in a popup filter has unexpected effect Commit: https://github.com/vim/vim/commit/371806e1642bbe17792f1e0fc7abe2ae13794635 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 22 13:44:54 2020 +0200 patch 8.2.1886: using ":silent!" in a popup filter has unexpected effect Problem: Using ":silent!" in a popup filter has unexpected effect. Solution: Use did_emsg instead of called_emsg. (closes https://github.com/vim/vim/issues/7178)
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Oct 2020 14:00:04 +0200
parents d5ce7dd60dc1
children 8059beb101d0
comparison
equal deleted inserted replaced
22674:9631fa0ff193 22675:ff29f22c93f7
2156 call popup_setoptions(g:winid, #{border: [], close: 'button'}) 2156 call popup_setoptions(g:winid, #{border: [], close: 'button'})
2157 call feedkeys("\<F5>\<LeftMouse>", "xt") 2157 call feedkeys("\<F5>\<LeftMouse>", "xt")
2158 endfunc 2158 endfunc
2159 func Popup_filter(winid, key) 2159 func Popup_filter(winid, key)
2160 if a:key == 'j' 2160 if a:key == 'j'
2161 silent! this_throws_an_error_but_is_ignored
2161 let line = popup_getoptions(a:winid).firstline 2162 let line = popup_getoptions(a:winid).firstline
2162 let nlines = line('$', a:winid) 2163 let nlines = line('$', a:winid)
2163 let newline = line < nlines ? (line + 1) : nlines 2164 let newline = line < nlines ? (line + 1) : nlines
2164 call popup_setoptions(a:winid, #{firstline: newline}) 2165 call popup_setoptions(a:winid, #{firstline: newline})
2165 return v:true 2166 return v:true