To: vim_dev@googlegroups.com Subject: Patch 8.1.1704 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1704 Problem: C-R C-W does not work after C-G when using 'incsearch'. Solution: Put cursor at end of the match. (Yasuhiro Matsumoto, closes #4664) Files: src/ex_getln.c, src/testdir/test_search.vim *** ../vim-8.1.1703/src/ex_getln.c 2019-07-12 17:57:54.836524031 +0200 --- src/ex_getln.c 2019-07-16 21:35:58.894173141 +0200 *************** *** 713,718 **** --- 713,719 ---- save_viewstate(&is_state->old_viewstate); update_screen(NOT_VALID); redrawcmdline(); + curwin->w_cursor = is_state->match_end; } else vim_beep(BO_ERROR); *** ../vim-8.1.1703/src/testdir/test_search.vim 2019-06-06 16:12:05.923134646 +0200 --- src/testdir/test_search.vim 2019-07-16 21:35:58.894173141 +0200 *************** *** 240,245 **** --- 240,249 ---- " go to previous match (on line 2) call feedkeys("/the\\\\\\\", 'tx') call assert_equal(' 2 these', getline('.')) + 1 + " go to previous match (on line 2) + call feedkeys("/the\\\\", 'tx') + call assert_equal('theother', @/) " Test 2: keep the view, " after deleting a character from the search cmd *************** *** 251,257 **** call assert_equal({'lnum': 10, 'leftcol': 0, 'col': 4, 'topfill': 0, 'topline': 6, 'coladd': 0, 'skipcol': 0, 'curswant': 4}, winsaveview()) " remove all history entries ! for i in range(10) call histdel('/') endfor --- 255,261 ---- call assert_equal({'lnum': 10, 'leftcol': 0, 'col': 4, 'topfill': 0, 'topline': 6, 'coladd': 0, 'skipcol': 0, 'curswant': 4}, winsaveview()) " remove all history entries ! for i in range(11) call histdel('/') endfor *************** *** 477,490 **** " Do not call test_override("char_avail", 1) so that and work " regardless char_avail. new ! call setline(1, [' 1 the first', ' 2 the second', ' 3 the third']) set incsearch 1 call feedkeys("/the\\\", 'tx') call assert_equal(' 3 the third', getline('.')) $ call feedkeys("?the\\\\", 'tx') ! call assert_equal(' 2 the second', getline('.')) " clean up set noincsearch bw! --- 481,494 ---- " Do not call test_override("char_avail", 1) so that and work " regardless char_avail. new ! call setline(1, [' 1 the first', ' 2 the second', ' 3 the third', '']) set incsearch 1 call feedkeys("/the\\\", 'tx') call assert_equal(' 3 the third', getline('.')) $ call feedkeys("?the\\\\", 'tx') ! call assert_equal(' 1 the first', getline('.')) " clean up set noincsearch bw! *** ../vim-8.1.1703/src/version.c 2019-07-16 21:19:51.502239956 +0200 --- src/version.c 2019-07-16 21:38:38.889472420 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1704, /**/ -- BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow? ARTHUR: What do you mean? An African or European swallow? BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh! BRIDGEKEEPER is cast into the gorge. "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 ///