call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green'])
endfunc
+func Test_inner_block_single_char()
+ new
+ call setline(1, "(a)")
+
+ set selection=inclusive
+ let @" = ''
+ call assert_nobeep('norm! 0faviby')
+ call assert_equal('a', @")
+
+ set selection=exclusive
+ let @" = ''
+ call assert_nobeep('norm! 0faviby')
+ call assert_equal('a', @")
+
+ set selection&
+ bwipe!
+endfunc
+
func Test_quote_selection_selection_exclusive()
new
call setline(1, "a 'bcde' f")
exe "norm! fdvhi'y"
call assert_equal('bcde', @")
- let @"='dummy'
+ let @" = 'dummy'
exe "norm! $gevi'y"
call assert_equal('bcde', @")
- let @"='dummy'
+ let @" = 'dummy'
exe "norm! 0fbhvi'y"
call assert_equal('bcde', @")
/*
* In Visual mode, when the resulting area is not bigger than what we
* started with, extend it to the next block, and then exclude again.
+ * Don't try to expand the area if the area is empty.
*/
if (!LT_POS(start_pos, old_start) && !LT_POS(old_end, curwin->w_cursor)
+ && !EQUAL_POS(start_pos, curwin->w_cursor)
&& VIsual_active)
{
curwin->w_cursor = old_start;