Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 18864:9449ed2ee8d4 v8.1.2418
patch 8.1.2418: bufnr('$') is wrong after recycling popup buffer
Commit: https://github.com/vim/vim/commit/99ebf22c523e3fdb491b2c92b6f3a7d42721361d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 10 23:44:48 2019 +0100
patch 8.1.2418: bufnr('$') is wrong after recycling popup buffer
Problem: bufnr('$') is wrong after recycling popup buffer.
Solution: Sort the buffer list by buffer number. (closes https://github.com/vim/vim/issues/5335)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 10 Dec 2019 23:45:04 +0100 |
parents | ae2bd5ec98d0 |
children | 5fbb167591fc |
comparison
equal
deleted
inserted
replaced
18863:964f1ada2f22 | 18864:9449ed2ee8d4 |
---|---|
3166 | 3166 |
3167 call StopVimInTerminal(buf) | 3167 call StopVimInTerminal(buf) |
3168 call delete('XtestPopupSign') | 3168 call delete('XtestPopupSign') |
3169 endfunc | 3169 endfunc |
3170 | 3170 |
3171 func Test_popupwin_bufnr() | |
3172 let popwin = popup_create(['blah'], #{}) | |
3173 let popbuf = winbufnr(popwin) | |
3174 split asdfasdf | |
3175 let newbuf = bufnr() | |
3176 call assert_true(newbuf > popbuf, 'New buffer number is higher') | |
3177 call assert_equal(newbuf, bufnr('$')) | |
3178 call popup_clear() | |
3179 let popwin = popup_create(['blah'], #{}) | |
3180 " reuses previous buffer number | |
3181 call assert_equal(popbuf, winbufnr(popwin)) | |
3182 call assert_equal(newbuf, bufnr('$')) | |
3183 | |
3184 call popup_clear() | |
3185 bwipe! | |
3186 endfunc | |
3187 | |
3171 " vim: shiftwidth=2 sts=2 | 3188 " vim: shiftwidth=2 sts=2 |