Mercurial > vim
comparison src/testdir/test_textobjects.vim @ 28980:42e3dfd5b2d6 v8.2.5012
patch 8.2.5012: cannot select one character inside ()
Commit: https://github.com/vim/vim/commit/53737b5eeeab1f95964f78b055d6094fab559533
Author: LemonBoy <thatlemon@gmail.com>
Date: Tue May 24 11:49:31 2022 +0100
patch 8.2.5012: cannot select one character inside ()
Problem: Cannot select one character inside ().
Solution: Do not try to extend the area if it is empty. (closes https://github.com/vim/vim/issues/10472,
closes #6616)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 24 May 2022 13:00:04 +0200 |
parents | 1ab5add6f4e8 |
children | bc6cf208b1b4 |
comparison
equal
deleted
inserted
replaced
28979:b49306ac0c96 | 28980:42e3dfd5b2d6 |
---|---|
39 | 39 |
40 func Test_inner_block_with_cpo_M_right_backslash() | 40 func Test_inner_block_with_cpo_M_right_backslash() |
41 call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green']) | 41 call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green']) |
42 endfunc | 42 endfunc |
43 | 43 |
44 func Test_inner_block_single_char() | |
45 new | |
46 call setline(1, "(a)") | |
47 | |
48 set selection=inclusive | |
49 let @" = '' | |
50 call assert_nobeep('norm! 0faviby') | |
51 call assert_equal('a', @") | |
52 | |
53 set selection=exclusive | |
54 let @" = '' | |
55 call assert_nobeep('norm! 0faviby') | |
56 call assert_equal('a', @") | |
57 | |
58 set selection& | |
59 bwipe! | |
60 endfunc | |
61 | |
44 func Test_quote_selection_selection_exclusive() | 62 func Test_quote_selection_selection_exclusive() |
45 new | 63 new |
46 call setline(1, "a 'bcde' f") | 64 call setline(1, "a 'bcde' f") |
47 set selection=exclusive | 65 set selection=exclusive |
48 | 66 |
49 exe "norm! fdvhi'y" | 67 exe "norm! fdvhi'y" |
50 call assert_equal('bcde', @") | 68 call assert_equal('bcde', @") |
51 | 69 |
52 let @"='dummy' | 70 let @" = 'dummy' |
53 exe "norm! $gevi'y" | 71 exe "norm! $gevi'y" |
54 call assert_equal('bcde', @") | 72 call assert_equal('bcde', @") |
55 | 73 |
56 let @"='dummy' | 74 let @" = 'dummy' |
57 exe "norm! 0fbhvi'y" | 75 exe "norm! 0fbhvi'y" |
58 call assert_equal('bcde', @") | 76 call assert_equal('bcde', @") |
59 | 77 |
60 set selection&vim | 78 set selection&vim |
61 bw! | 79 bw! |