Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 18339:a776385eac9f v8.1.2164
patch 8.1.2164: stuck when using "j" in a popupwin with popup_filter_menu
Commit: https://github.com/vim/vim/commit/7b3d93966709998011e2eb3b84414ff454161b37
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 16 22:17:07 2019 +0200
patch 8.1.2164: stuck when using "j" in a popupwin with popup_filter_menu
Problem: Stuck when using "j" in a popupwin with popup_filter_menu if a
line wraps.
Solution: Check the cursor line is visible. (closes #4577)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Oct 2019 22:30:04 +0200 |
parents | 25535ef50842 |
children | ba5d8c5d77d7 |
comparison
equal
deleted
inserted
replaced
18338:93ce94d4d30c | 18339:a776385eac9f |
---|---|
505 call VerifyScreenDump(buf, 'Test_popupwin_close_05', {}) | 505 call VerifyScreenDump(buf, 'Test_popupwin_close_05', {}) |
506 | 506 |
507 " clean up | 507 " clean up |
508 call StopVimInTerminal(buf) | 508 call StopVimInTerminal(buf) |
509 call delete('XtestPopupClose') | 509 call delete('XtestPopupClose') |
510 endfunction | |
511 | |
512 func Test_popup_menu_wrap() | |
513 CheckScreendump | |
514 | |
515 let lines =<< trim END | |
516 call setline(1, range(1, 20)) | |
517 call popup_create([ | |
518 \ 'one', | |
519 \ 'asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfas', | |
520 \ 'three', | |
521 \ 'four', | |
522 \ ], #{ | |
523 \ pos: "botleft", | |
524 \ border: [], | |
525 \ padding: [0,1,0,1], | |
526 \ maxheight: 3, | |
527 \ cursorline: 1, | |
528 \ filter: 'popup_filter_menu', | |
529 \ }) | |
530 END | |
531 call writefile(lines, 'XtestPopupWrap') | |
532 let buf = RunVimInTerminal('-S XtestPopupWrap', #{rows: 10}) | |
533 call VerifyScreenDump(buf, 'Test_popupwin_wrap_1', {}) | |
534 | |
535 call term_sendkeys(buf, "jj") | |
536 call VerifyScreenDump(buf, 'Test_popupwin_wrap_2', {}) | |
537 | |
538 " clean up | |
539 call term_sendkeys(buf, "\<Esc>") | |
540 call StopVimInTerminal(buf) | |
541 call delete('XtestPopupWrap') | |
510 endfunction | 542 endfunction |
511 | 543 |
512 func Test_popup_with_mask() | 544 func Test_popup_with_mask() |
513 CheckScreendump | 545 CheckScreendump |
514 | 546 |