To: vim_dev@googlegroups.com Subject: Patch 8.2.2568 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2568 Problem: Second time a preview popup is opened highlight is not set. (Gabriel Dupras) Solution: Apply 'previewpopup' after getting the file. (closes #7928) Files: src/tag.c, src/testdir/test_popupwin.vim, src/testdir/dumps/Test_popupwin_previewpopup_2.dump, src/testdir/dumps/Test_popupwin_previewpopup_3.dump, src/testdir/dumps/Test_popupwin_previewpopup_4.dump, src/testdir/dumps/Test_popupwin_previewpopup_5.dump *** ../vim-8.2.2567/src/tag.c 2021-01-10 20:22:20.767926906 +0100 --- src/tag.c 2021-03-04 21:34:00.435813569 +0100 *************** *** 3510,3515 **** --- 3510,3520 ---- // Save value of no_hlsearch, jumping to a tag is not a real search save_no_hlsearch = no_hlsearch; #endif + #ifdef FEAT_PROP_POPUP + // getfile() may have cleared options, apply 'previewpopup' again. + if (g_do_tagpreview != 0 && *p_pvp != NUL) + parse_previewpopup(curwin); + #endif /* * If 'cpoptions' contains 't', store the search pattern for the "n" *** ../vim-8.2.2567/src/testdir/test_popupwin.vim 2021-02-21 23:12:14.130105982 +0100 --- src/testdir/test_popupwin.vim 2021-03-04 21:30:37.192196280 +0100 *************** *** 3159,3164 **** --- 3159,3165 ---- \ 'this is another word', \ 'very long line where the word is also another']) set previewpopup=height:4,width:40 + hi OtherColor ctermbg=lightcyan guibg=lightcyan set path=. END call writefile(lines, 'XtestPreviewPopup') *************** *** 3168,3173 **** --- 3169,3175 ---- call term_sendkeys(buf, ":\") call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_1', {}) + call term_sendkeys(buf, ":set previewpopup+=highlight:OtherColor\") call term_sendkeys(buf, "/another\\}") call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_2', {}) *************** *** 3182,3187 **** --- 3184,3190 ---- call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_5', {}) call term_sendkeys(buf, ":silent cd testdir\") + call term_sendkeys(buf, ":set previewpopup-=highlight:OtherColor\") call term_sendkeys(buf, ":pclose\") call term_sendkeys(buf, ":\") call VerifyScreenDump(buf, 'Test_popupwin_previewpopup_6', {}) *** ../vim-8.2.2567/src/testdir/dumps/Test_popupwin_previewpopup_2.dump 2019-08-05 21:05:07.000000000 +0200 --- src/testdir/dumps/Test_popupwin_previewpopup_2.dump 2021-03-04 21:31:23.408111585 +0100 *************** *** 1,12 **** |o+0&#ffffff0|n|e| @71 |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 ! |f|o|u|r| @3|╔+0#0000001#ffd7ff255| |X|t|a|g|f|i|l|e| |═@30|X| +0#0000000#ffffff0@23 ! |f|i|v|e| @3|║+0#0000001#ffd7ff255|2|7| @37| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@23 ! |s|i|x| @4|║+0#0000001#ffd7ff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@23 ! |s|e|v|e|n| @2|║+0#0000001#ffd7ff255|2|9| @37| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@23 ! |f|i|n|d| |t|h|e|║+0#0000001#ffd7ff255|3|0| @37| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@23 ! |n|i|n|e| @3|╚+0#0000001#ffd7ff255|═@40|⇲| +0#0000000#ffffff0@23 |t|h|i|s| |i|s| >a|n|o|t|h|e|r| |w|o|r|d| @54 |v|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| |a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 --- 1,12 ---- |o+0&#ffffff0|n|e| @71 |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 ! |f|o|u|r| @3|╔+0&#afffff255| |X|t|a|g|f|i|l|e| |═@30|X| +0&#ffffff0@23 ! |f|i|v|e| @3|║+0&#afffff255|2|7| @37| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@23 ! |s|i|x| @4|║+0&#afffff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @18| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@23 ! |s|e|v|e|n| @2|║+0&#afffff255|2|9| @37| +0|║+0&#afffff255| +0&#ffffff0@23 ! |f|i|n|d| |t|h|e|║+0&#afffff255|3|0| @37| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@23 ! |n|i|n|e| @3|╚+0&#afffff255|═@40|⇲| +0&#ffffff0@23 |t|h|i|s| |i|s| >a|n|o|t|h|e|r| |w|o|r|d| @54 |v|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| |a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 *** ../vim-8.2.2567/src/testdir/dumps/Test_popupwin_previewpopup_3.dump 2019-08-05 21:05:08.000000000 +0200 --- src/testdir/dumps/Test_popupwin_previewpopup_3.dump 2021-03-04 21:31:24.468109625 +0100 *************** *** 1,12 **** |o+0&#ffffff0|n|e| @71 |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 ! |f|o|u|r| @9|╔+0#0000001#ffd7ff255| |X|t|a|g|f|i|l|e| |═@30|X| +0#0000000#ffffff0@17 ! |f|i|v|e| @9|║+0#0000001#ffd7ff255|2|7| @37| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@17 ! |s|i|x| @10|║+0#0000001#ffd7ff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @18| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@17 ! |s|e|v|e|n| @8|║+0#0000001#ffd7ff255|2|9| @37| +0#0000000#0000001|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@17 ! |f|i|n|d| |t|h|e|w|o|r|d| |s|║+0#0000001#ffd7ff255|3|0| @37| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@17 ! |n|i|n|e| @9|╚+0#0000001#ffd7ff255|═@40|⇲| +0#0000000#ffffff0@17 |t|h|i|s| |i|s| >a|n|o|t|h|e|r| |w|o|r|d| @54 |v|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| |a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 --- 1,12 ---- |o+0&#ffffff0|n|e| @71 |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 ! |f|o|u|r| @9|╔+0&#afffff255| |X|t|a|g|f|i|l|e| |═@30|X| +0&#ffffff0@17 ! |f|i|v|e| @9|║+0&#afffff255|2|7| @37| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@17 ! |s|i|x| @10|║+0&#afffff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @18| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@17 ! |s|e|v|e|n| @8|║+0&#afffff255|2|9| @37| +0|║+0&#afffff255| +0&#ffffff0@17 ! |f|i|n|d| |t|h|e|w|o|r|d| |s|║+0&#afffff255|3|0| @37| +0&#a8a8a8255|║+0&#afffff255| +0&#ffffff0@17 ! |n|i|n|e| @9|╚+0&#afffff255|═@40|⇲| +0&#ffffff0@17 |t|h|i|s| |i|s| >a|n|o|t|h|e|r| |w|o|r|d| @54 |v|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| |a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 *** ../vim-8.2.2567/src/testdir/dumps/Test_popupwin_previewpopup_4.dump 2019-11-02 19:26:48.000000000 +0100 --- src/testdir/dumps/Test_popupwin_previewpopup_4.dump 2021-03-04 21:31:25.524107672 +0100 *************** *** 2,14 **** |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 |f|o|u|r| @70 ! |f|i|v|e| @28|╔+0#0000001#ffd7ff255| |X|t|a|g|f|i|l|e| |═@29|X ! |s+0#0000000#ffffff0|i|x| @29|║+0#0000001#ffd7ff255|2|7| @36| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |s+0#0000000#ffffff0|e|v|e|n| @27|║+0#0000001#ffd7ff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @17| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |f+0#0000000#ffffff0|i|n|d| |t|h|e|w|o|r|d| |s|o|m|e|w|h|e|r|e| @10|║+0#0000001#ffd7ff255|2|9| @36| +0#0000000#0000001|║+0#0000001#ffd7ff255 ! |n+0#0000000#ffffff0|i|n|e| @28|║+0#0000001#ffd7ff255|3|0| @36| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |t+0#0000000#ffffff0|h|i|s| |i|s| |a|n|o|t|h|e|r| |w|o|r|d| @12|╚+0#0000001#ffd7ff255|═@39|⇲ ! |v+0#0000000#ffffff0|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| >a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 |~| @73 |/+0#0000000&|a|n|o|t|h|e|r| @48|1@1|,|3|9| @8|A|l@1| --- 2,14 ---- |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 |f|o|u|r| @70 ! |f|i|v|e| @28|╔+0&#afffff255| |X|t|a|g|f|i|l|e| |═@29|X ! |s+0&#ffffff0|i|x| @29|║+0&#afffff255|2|7| @36| +0&#a8a8a8255|║+0&#afffff255 ! |s+0&#ffffff0|e|v|e|n| @27|║+0&#afffff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @17| +0&#a8a8a8255|║+0&#afffff255 ! |f+0&#ffffff0|i|n|d| |t|h|e|w|o|r|d| |s|o|m|e|w|h|e|r|e| @10|║+0&#afffff255|2|9| @36| +0|║+0&#afffff255 ! |n+0&#ffffff0|i|n|e| @28|║+0&#afffff255|3|0| @36| +0&#a8a8a8255|║+0&#afffff255 ! |t+0&#ffffff0|h|i|s| |i|s| |a|n|o|t|h|e|r| |w|o|r|d| @12|╚+0&#afffff255|═@39|⇲ ! |v+0&#ffffff0|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| >a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 |~| @73 |/+0#0000000&|a|n|o|t|h|e|r| @48|1@1|,|3|9| @8|A|l@1| *** ../vim-8.2.2567/src/testdir/dumps/Test_popupwin_previewpopup_5.dump 2019-11-02 19:52:27.000000000 +0100 --- src/testdir/dumps/Test_popupwin_previewpopup_5.dump 2021-03-04 21:31:26.584105710 +0100 *************** *** 2,14 **** |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 |f|o|u|r| @70 ! |f|i|v|e| @28|╔+0#0000001#ffd7ff255| |t|e|s|t|d|i|r|/|X|t|a|g|f|i|l|e| |═@21|X ! |s+0#0000000#ffffff0|i|x| @29|║+0#0000001#ffd7ff255|2|7| @36| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |s+0#0000000#ffffff0|e|v|e|n| @27|║+0#0000001#ffd7ff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @17| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |f+0#0000000#ffffff0|i|n|d| |t|h|e|w|o|r|d| |s|o|m|e|w|h|e|r|e| @10|║+0#0000001#ffd7ff255|2|9| @36| +0#0000000#0000001|║+0#0000001#ffd7ff255 ! |n+0#0000000#ffffff0|i|n|e| @28|║+0#0000001#ffd7ff255|3|0| @36| +0#0000000#a8a8a8255|║+0#0000001#ffd7ff255 ! |t+0#0000000#ffffff0|h|i|s| |i|s| |a|n|o|t|h|e|r| |w|o|r|d| @12|╚+0#0000001#ffd7ff255|═@39|⇲ ! |v+0#0000000#ffffff0|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| >a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 |~| @73 |:+0#0000000&| @55|1@1|,|3|9| @8|A|l@1| --- 2,14 ---- |#|i|n|c|l|u|d|e| |"|X|h|e|a|d|e|r|.|h|"| @54 |t|h|r|e@1| @69 |f|o|u|r| @70 ! |f|i|v|e| @28|╔+0&#afffff255| |t|e|s|t|d|i|r|/|X|t|a|g|f|i|l|e| |═@21|X ! |s+0&#ffffff0|i|x| @29|║+0&#afffff255|2|7| @36| +0&#a8a8a8255|║+0&#afffff255 ! |s+0&#ffffff0|e|v|e|n| @27|║+0&#afffff255|t|h|i|s| |i|s| |a|n|o|t|h|e|r| |p|l|a|c|e| @17| +0&#a8a8a8255|║+0&#afffff255 ! |f+0&#ffffff0|i|n|d| |t|h|e|w|o|r|d| |s|o|m|e|w|h|e|r|e| @10|║+0&#afffff255|2|9| @36| +0|║+0&#afffff255 ! |n+0&#ffffff0|i|n|e| @28|║+0&#afffff255|3|0| @36| +0&#a8a8a8255|║+0&#afffff255 ! |t+0&#ffffff0|h|i|s| |i|s| |a|n|o|t|h|e|r| |w|o|r|d| @12|╚+0&#afffff255|═@39|⇲ ! |v+0&#ffffff0|e|r|y| |l|o|n|g| |l|i|n|e| |w|h|e|r|e| |t|h|e| |w|o|r|d| |i|s| |a|l|s|o| >a|n|o|t|h|e|r| @29 |~+0#4040ff13&| @73 |~| @73 |:+0#0000000&| @55|1@1|,|3|9| @8|A|l@1| *** ../vim-8.2.2567/src/version.c 2021-03-04 12:38:17.387440049 +0100 --- src/version.c 2021-03-04 20:51:50.560514067 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2568, /**/ -- (letter from Mark to Mike, about the film's probable certificate) For an 'A' we would have to: Lose as many shits as possible; Take Jesus Christ out, if possible; Loose "I fart in your general direction"; Lose "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your testicles" "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///