Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 27464:a14c4d3e3260 v8.2.4260
patch 8.2.4260: Vim9: can still use a global function without g:
Commit: https://github.com/vim/vim/commit/848faddb870f3ba4d84fcacd1cccb5cdbbfd9c41
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 30 15:28:30 2022 +0000
patch 8.2.4260: Vim9: can still use a global function without g:
Problem: Vim9: can still use a global function without g: at the script
level.
Solution: Also check for g: at the script level. (issue #9637)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Jan 2022 16:30:04 +0100 |
parents | 4c16acb2525f |
children | 8ef5c996df31 |
comparison
equal
deleted
inserted
replaced
27463:c50f682d1183 | 27464:a14c4d3e3260 |
---|---|
2261 \ firstline: 1, | 2261 \ firstline: 1, |
2262 \ lastline: 4, | 2262 \ lastline: 4, |
2263 \ wrap: true, | 2263 \ wrap: true, |
2264 \ scrollbar: true, | 2264 \ scrollbar: true, |
2265 \ mapping: false, | 2265 \ mapping: false, |
2266 \ filter: Popup_filter, | 2266 \ filter: g:Popup_filter, |
2267 \ }) | 2267 \ }) |
2268 enddef | 2268 enddef |
2269 | 2269 |
2270 func PopupScroll() | 2270 func PopupScroll() |
2271 call popup_clear() | 2271 call popup_clear() |
2326 call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxheight: 0, minwidth: 0})\<CR>") | 2326 call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxheight: 0, minwidth: 0})\<CR>") |
2327 call term_sendkeys(buf, ":\<CR>") | 2327 call term_sendkeys(buf, ":\<CR>") |
2328 call VerifyScreenDump(buf, 'Test_popupwin_scroll_10', {}) | 2328 call VerifyScreenDump(buf, 'Test_popupwin_scroll_10', {}) |
2329 | 2329 |
2330 " check size with non-wrapping lines | 2330 " check size with non-wrapping lines |
2331 call term_sendkeys(buf, ":call PopupScroll()\<CR>") | 2331 call term_sendkeys(buf, ":call g:PopupScroll()\<CR>") |
2332 call VerifyScreenDump(buf, 'Test_popupwin_scroll_11', {}) | 2332 call VerifyScreenDump(buf, 'Test_popupwin_scroll_11', {}) |
2333 | 2333 |
2334 " check size with wrapping lines | 2334 " check size with wrapping lines |
2335 call term_sendkeys(buf, "j") | 2335 call term_sendkeys(buf, "j") |
2336 call VerifyScreenDump(buf, 'Test_popupwin_scroll_12', {}) | 2336 call VerifyScreenDump(buf, 'Test_popupwin_scroll_12', {}) |