To: vim_dev@googlegroups.com Subject: Patch 8.2.1581 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1581 Problem: Using line() for global popup window doesn't work. Solution: Set tabpage to "curtab". (closes #6847) Files: src/evalwindow.c, src/testdir/test_popupwin.vim *** ../vim-8.2.1580/src/evalwindow.c 2020-08-09 14:03:51.541367942 +0200 --- src/evalwindow.c 2020-09-03 18:50:56.460011159 +0200 *************** *** 117,123 **** if (wp->w_id == id) { if (tpp != NULL) ! *tpp = tp; return wp; } #endif --- 117,123 ---- if (wp->w_id == id) { if (tpp != NULL) ! *tpp = curtab; // any tabpage would do return wp; } #endif *** ../vim-8.2.1580/src/testdir/test_popupwin.vim 2020-09-02 22:33:20.824524597 +0200 --- src/testdir/test_popupwin.vim 2020-09-03 18:49:47.068331564 +0200 *************** *** 2239,2244 **** --- 2239,2256 ---- call delete('XtestPopupSetText') endfunc + func Test_popup_settext_getline() + let id = popup_create('', #{ tabpage: 0 }) + call popup_settext(id, ['a','b']) + call assert_equal(2, line('$', id)) " OK :) + call popup_close(id) + + let id = popup_create('', #{ tabpage: -1 }) + call popup_settext(id, ['a','b']) + call assert_equal(2, line('$', id)) " Fails :( + call popup_close(id) + endfunc + func Test_popup_hidden() new *** ../vim-8.2.1580/src/version.c 2020-09-03 16:49:49.721754552 +0200 --- src/version.c 2020-09-03 18:47:53.016885138 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1581, /**/ -- CUSTOMER: Well, can you hang around a couple of minutes? He won't be long. MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today. CUSTOMER: Well, when is your next round? MORTICIAN: Thursday. DEAD PERSON: I think I'll go for a walk. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///