Patch 8.1.2314
Problem: vi' sometimes does not select anything.
Solution: Recognize an empty selection. (Christian Brabandt, closes #5183)
Files: src/search.c, src/testdir/test_textobjects.vim
*** ../vim-8.1.2313/src/search.c 2019-11-17 17:06:25.828081709 +0100
--- src/search.c 2019-11-17 17:28:12.404623475 +0100
***************
*** 4434,4442 ****
return FALSE;
vis_bef_curs = LT_POS(VIsual, curwin->w_cursor);
if (*p_sel == 'e')
{
! if (!vis_bef_curs)
{
// VIsual needs to be the start of Visual selection.
pos_T t = curwin->w_cursor;
--- 4434,4443 ----
return FALSE;
vis_bef_curs = LT_POS(VIsual, curwin->w_cursor);
+ vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
if (*p_sel == 'e')
{
! if (!vis_bef_curs && !vis_empty)
{
// VIsual needs to be the start of Visual selection.
pos_T t = curwin->w_cursor;
***************
*** 4447,4454 ****
restore_vis_bef = TRUE;
}
dec_cursor();
}
- vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
}
if (!vis_empty)
--- 4448,4455 ----
restore_vis_bef = TRUE;
}
dec_cursor();
+ vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
}
}
if (!vis_empty)
*** ../vim-8.1.2313/src/testdir/test_textobjects.vim 2019-06-15
17:57:43.976724009 +0200
--- src/testdir/test_textobjects.vim 2019-11-17 17:28:12.408623493 +0100
***************
*** 47,52 ****
--- 47,55 ----
set selection=exclusive
exe "norm! fdvhi'y"
call assert_equal('bcde', @")
+ let @"='dummy'
+ exe "norm! $gevi'y"
+ call assert_equal('bcde', @")
set selection&vim
bw!
endfunc
*** ../vim-8.1.2313/src/version.c 2019-11-17 17:06:25.828081709 +0100
--- src/version.c 2019-11-17 17:30:19.193141869 +0100
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 2314,
/**/
--
>From "know your smileys":
8<}} Glasses, big nose, beard
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201911171633.xAHGX7K4028056%40masaka.moolenaar.net.