Re: Patch 8.0.1238
On Do, 02 Nov 2017, Bram Moolenaar wrote: > > Christian Brabandt wrote: > > > On Di, 31 Okt 2017, Christian Brabandt wrote: > > > > > > > > On So, 29 Okt 2017, Bram Moolenaar wrote: > > > > > > > Patch 8.0.1238 > > > > Problem:Incremental search only shows one match. > > > > Solution: When 'incsearch' and and 'hlsearch' are both set highlight > > > > all > > > > matches. (haya14busa, closes #2198) > > > > Files: runtime/doc/options.txt, src/ex_getln.c, > > > > src/proto/search.pro, > > > > src/search.c, src/testdir/test_search.vim > > > > > > It looks like the test does not work correctly on Windows. I see some > > > failures: > > > https://ci.appveyor.com/project/chrisbra/vim-win32-installer/build/job/g4p49k5gh6k3nbq5 > > > , > > > | From test_search.vim: > > > | Found errors in Test_search_cmdline_incsearch_highlight_attr(): > > > function RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > > | line 28: Expected not equal to 292 function > > > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > > | line 29: Expected not equal to 292 function > > > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > > | line 30: Expected not equal to 292 > > > | TEST FAILURE NMAKE : fatal error U1077: 'if' : return code '0x1' > > > ` > > > > > > This test is now disabled for the vim-win32-installer build. Once it > > > builds again, I'll try to debug this test. > > > > I debugged it a bit further. I think the problem is this line: > > , > > | call term_sendkeys(g:buf, 'i' . join(lines, "\n") . "\gg0") > > ` > > > > Sending "\" does not work. Instead it looks like it sends meta/alt > > key, e.g. it set's the high bit of the following character and therefore > > does never exit insert mode. > > Strange, is this not using the normal termcap perhaps? on Windows? Isn't that a unix thing? Christian -- Die Welt zerfällt in die, die das Unglaubliche glauben, und die die das Unwahrscheinliche tun. -- Lord Illingworth -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1238
Christian Brabandt wrote: > On Di, 31 Okt 2017, Christian Brabandt wrote: > > > > > On So, 29 Okt 2017, Bram Moolenaar wrote: > > > > > Patch 8.0.1238 > > > Problem:Incremental search only shows one match. > > > Solution: When 'incsearch' and and 'hlsearch' are both set highlight all > > > matches. (haya14busa, closes #2198) > > > Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro, > > > src/search.c, src/testdir/test_search.vim > > > > It looks like the test does not work correctly on Windows. I see some > > failures: > > https://ci.appveyor.com/project/chrisbra/vim-win32-installer/build/job/g4p49k5gh6k3nbq5 > > , > > | From test_search.vim: > > | Found errors in Test_search_cmdline_incsearch_highlight_attr(): function > > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > | line 28: Expected not equal to 292 function > > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > | line 29: Expected not equal to 292 function > > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > > | line 30: Expected not equal to 292 > > | TEST FAILURE NMAKE : fatal error U1077: 'if' : return code '0x1' > > ` > > > > This test is now disabled for the vim-win32-installer build. Once it > > builds again, I'll try to debug this test. > > I debugged it a bit further. I think the problem is this line: > , > | call term_sendkeys(g:buf, 'i' . join(lines, "\n") . "\gg0") > ` > > Sending "\" does not work. Instead it looks like it sends meta/alt > key, e.g. it set's the high bit of the following character and therefore > does never exit insert mode. Strange, is this not using the normal termcap perhaps? > I don't know why this is so here is a patch, that uses a temp file as a > workaround. Thanks. I'll change the first term_wait() into WaitFor(), that's more reliable. -- SIGFUN -- signature too funny (core dumped) /// Bram Moolenaar -- b...@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/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1238
On Di, 31 Okt 2017, Christian Brabandt wrote: > > On So, 29 Okt 2017, Bram Moolenaar wrote: > > > Patch 8.0.1238 > > Problem:Incremental search only shows one match. > > Solution: When 'incsearch' and and 'hlsearch' are both set highlight all > > matches. (haya14busa, closes #2198) > > Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro, > > src/search.c, src/testdir/test_search.vim > > It looks like the test does not work correctly on Windows. I see some > failures: > https://ci.appveyor.com/project/chrisbra/vim-win32-installer/build/job/g4p49k5gh6k3nbq5 > , > | From test_search.vim: > | Found errors in Test_search_cmdline_incsearch_highlight_attr(): function > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > | line 28: Expected not equal to 292 function > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > | line 29: Expected not equal to 292 function > RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr > | line 30: Expected not equal to 292 > | TEST FAILURE NMAKE : fatal error U1077: 'if' : return code '0x1' > ` > > This test is now disabled for the vim-win32-installer build. Once it > builds again, I'll try to debug this test. I debugged it a bit further. I think the problem is this line: , | call term_sendkeys(g:buf, 'i' . join(lines, "\n") . "\gg0") ` Sending "\" does not work. Instead it looks like it sends meta/alt key, e.g. it set's the high bit of the following character and therefore does never exit insert mode. I don't know why this is so here is a patch, that uses a temp file as a workaround. diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index b863fcbba..361df8069 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -494,13 +494,14 @@ func Test_search_cmdline_incsearch_highlight_attr() if h < 3 return endif - let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3}) - " Prepare buffer text let lines = ['abb vim vim vi', 'vimvivim'] - call term_sendkeys(g:buf, 'i' . join(lines, "\n") . "\gg0") + call writefile(lines, 'Xsearch.txt') + let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3}) + call term_wait(g:buf, 200) call assert_equal(lines[0], term_getline(g:buf, 1)) + call assert_equal(lines[1], term_getline(g:buf, 2)) " Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight call term_sendkeys(g:buf, ":set incsearch hlsearch\") @@ -564,6 +565,7 @@ func Test_search_cmdline_incsearch_highlight_attr() let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0] call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr')) call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr')) + call delete('Xsearch.txt') bwipe! endfunc Christian -- Hart ist Hart. Weich ist Weich. Aber immer weich ist hart. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1238
On So, 29 Okt 2017, Bram Moolenaar wrote: > Patch 8.0.1238 > Problem:Incremental search only shows one match. > Solution: When 'incsearch' and and 'hlsearch' are both set highlight all > matches. (haya14busa, closes #2198) > Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro, > src/search.c, src/testdir/test_search.vim It looks like the test does not work correctly on Windows. I see some failures: https://ci.appveyor.com/project/chrisbra/vim-win32-installer/build/job/g4p49k5gh6k3nbq5 , | From test_search.vim: | Found errors in Test_search_cmdline_incsearch_highlight_attr(): function RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr | line 28: Expected not equal to 292 function RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr | line 29: Expected not equal to 292 function RunTheTest[34]..Test_search_cmdline_incsearch_highlight_attr | line 30: Expected not equal to 292 | TEST FAILURE NMAKE : fatal error U1077: 'if' : return code '0x1' ` This test is now disabled for the vim-win32-installer build. Once it builds again, I'll try to debug this test. Christian -- In Hollywood gibt es keinen Taxifahrer, der nicht am Abend Drehbücher schreibt. -- Wim Wenders -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1238
On Monday, October 30, 2017 at 12:40:55 AM UTC+9, Bram Moolenaar wrote: > Patch 8.0.1238 > Problem:Incremental search only shows one match. > Solution: When 'incsearch' and and 'hlsearch' are both set highlight all > matches. (haya14busa, closes #2198) > Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro, > src/search.c, src/testdir/test_search.vim > > > *** ../vim-8.0.1237/runtime/doc/options.txt 2017-10-08 17:41:30.084460598 > +0200 > --- runtime/doc/options.txt 2017-10-29 16:26:46.071744991 +0100 > /**1 > *** > *** 4034,4064 > define one. The default uses a different group for each occasion. > See |highlight-default| for the default highlight groups. > > - *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* > - 'hlsearch' 'hls'boolean (default off) > - global > - {not in Vi} > - {not available when compiled without the > - |+extra_search| feature} > - When there is a previous search pattern, highlight all its matches. > - The type of highlighting used can be set with the 'l' occasion in the > - 'highlight' option. This uses the "Search" highlight group by > - default. Note that only the matching text is highlighted, any offsets > - are not applied. > - See also: 'incsearch' and |:match|. > - When you get bored looking at the highlighted matches, you can turn it > - off with |:nohlsearch|. This does not change the option value, as > - soon as you use a search command, the highlighting comes back. > - 'redrawtime' specifies the maximum time spent on finding matches. > - When the search pattern can match an end-of-line, Vim will try to > - highlight all of the matched text. However, this depends on where the > - search starts. This will be the first line in the window or the first > - line below a closed fold. A match in a previous line which is not > - drawn may not continue in a newly drawn line. > - You can specify whether the highlight status is restored on startup > - with the 'h' flag in 'viminfo' |viminfo-h|. > - NOTE: This option is reset when 'compatible' is set. > - > *'history'* *'hi'* > 'history' 'hi' number (Vim default: 50, Vi default: 0, >set to 200 in |defaults.vim|) > --- 4130,4135 > *** > *** 4093,4098 > --- 4164,4194 > See |rileft.txt|. > NOTE: This option is reset when 'compatible' is set. > > + *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* > + 'hlsearch' 'hls'boolean (default off) > + global > + {not in Vi} > + {not available when compiled without the > + |+extra_search| feature} > + When there is a previous search pattern, highlight all its matches. > + The type of highlighting used can be set with the 'l' occasion in the > + 'highlight' option. This uses the "Search" highlight group by > + default. Note that only the matching text is highlighted, any offsets > + are not applied. > + See also: 'incsearch' and |:match|. > + When you get bored looking at the highlighted matches, you can turn it > + off with |:nohlsearch|. This does not change the option value, as > + soon as you use a search command, the highlighting comes back. > + 'redrawtime' specifies the maximum time spent on finding matches. > + When the search pattern can match an end-of-line, Vim will try to > + highlight all of the matched text. However, this depends on where the > + search starts. This will be the first line in the window or the first > + line below a closed fold. A match in a previous line which is not > + drawn may not continue in a newly drawn line. > + You can specify whether the highlight status is restored on startup > + with the 'h' flag in 'viminfo' |viminfo-h|. > + NOTE: This option is reset when 'compatible' is set. > + > *'icon'* *'noicon'* > 'icon' boolean (default off, on when title can be > restored) > global > *** > *** 4344,4357 > original position when no match is found and when pressing . You > still need to finish the search command with to move the > cursor to the match. > ! You can use the CTRL-N and CTRL-P keys to move to the next and > ! previous matc
Patch 8.0.1238
Patch 8.0.1238 Problem:Incremental search only shows one match. Solution: When 'incsearch' and and 'hlsearch' are both set highlight all matches. (haya14busa, closes #2198) Files: runtime/doc/options.txt, src/ex_getln.c, src/proto/search.pro, src/search.c, src/testdir/test_search.vim *** ../vim-8.0.1237/runtime/doc/options.txt 2017-10-08 17:41:30.084460598 +0200 --- runtime/doc/options.txt 2017-10-29 16:26:46.071744991 +0100 /**1 *** *** 4034,4064 define one. The default uses a different group for each occasion. See |highlight-default| for the default highlight groups. -*'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* - 'hlsearch' 'hls' boolean (default off) - global - {not in Vi} - {not available when compiled without the - |+extra_search| feature} - When there is a previous search pattern, highlight all its matches. - The type of highlighting used can be set with the 'l' occasion in the - 'highlight' option. This uses the "Search" highlight group by - default. Note that only the matching text is highlighted, any offsets - are not applied. - See also: 'incsearch' and |:match|. - When you get bored looking at the highlighted matches, you can turn it - off with |:nohlsearch|. This does not change the option value, as - soon as you use a search command, the highlighting comes back. - 'redrawtime' specifies the maximum time spent on finding matches. - When the search pattern can match an end-of-line, Vim will try to - highlight all of the matched text. However, this depends on where the - search starts. This will be the first line in the window or the first - line below a closed fold. A match in a previous line which is not - drawn may not continue in a newly drawn line. - You can specify whether the highlight status is restored on startup - with the 'h' flag in 'viminfo' |viminfo-h|. - NOTE: This option is reset when 'compatible' is set. - *'history'* *'hi'* 'history' 'hi'number (Vim default: 50, Vi default: 0, set to 200 in |defaults.vim|) --- 4130,4135 *** *** 4093,4098 --- 4164,4194 See |rileft.txt|. NOTE: This option is reset when 'compatible' is set. +*'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* + 'hlsearch' 'hls' boolean (default off) + global + {not in Vi} + {not available when compiled without the + |+extra_search| feature} + When there is a previous search pattern, highlight all its matches. + The type of highlighting used can be set with the 'l' occasion in the + 'highlight' option. This uses the "Search" highlight group by + default. Note that only the matching text is highlighted, any offsets + are not applied. + See also: 'incsearch' and |:match|. + When you get bored looking at the highlighted matches, you can turn it + off with |:nohlsearch|. This does not change the option value, as + soon as you use a search command, the highlighting comes back. + 'redrawtime' specifies the maximum time spent on finding matches. + When the search pattern can match an end-of-line, Vim will try to + highlight all of the matched text. However, this depends on where the + search starts. This will be the first line in the window or the first + line below a closed fold. A match in a previous line which is not + drawn may not continue in a newly drawn line. + You can specify whether the highlight status is restored on startup + with the 'h' flag in 'viminfo' |viminfo-h|. + NOTE: This option is reset when 'compatible' is set. + *'icon'* *'noicon'* 'icon'boolean (default off, on when title can be restored) global *** *** 4344,4357 original position when no match is found and when pressing . You still need to finish the search command with to move the cursor to the match. ! You can use the CTRL-N and CTRL-P keys to move to the next and ! previous match. |c_CTRL-N| |c_CTRL-P| When compiled with the |+reltime| feature Vim only searches for about half a second. With a complicated pattern and/or a lot of text the match may not be found. This is to avoid that Vim hangs while you are typing the pattern. The highlighting can be set with the 'i' flag in 'highlight'. ! See also: 'hlsearch'