Merge remote-tracking branch 'lenormf/select-arbitrary-punctuation'
This commit is contained in:
commit
35f1ad100e
|
@ -996,6 +996,14 @@ void select_object(Context& context, NormalParams params)
|
|||
sur.opening, sur.closing,
|
||||
level, flags));
|
||||
}
|
||||
|
||||
if (is_punctuation(*cp))
|
||||
{
|
||||
StringView strview_codepoint{String(*cp)};
|
||||
return select<mode>(context, std::bind(select_surrounding, _1, _2,
|
||||
strview_codepoint, strview_codepoint,
|
||||
level, flags));
|
||||
}
|
||||
}, get_title(),
|
||||
"b,(,): parenthesis block\n"
|
||||
"B,{,}: braces block \n"
|
||||
|
|
1
test/unit/around/slash/cmd
Normal file
1
test/unit/around/slash/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
<a-a>/
|
1
test/unit/around/slash/in
Normal file
1
test/unit/around/slash/in
Normal file
|
@ -0,0 +1 @@
|
|||
foo(/%(b)ar/)
|
1
test/unit/around/slash/selections
Normal file
1
test/unit/around/slash/selections
Normal file
|
@ -0,0 +1 @@
|
|||
/bar/
|
1
test/unit/inner/slash/cmd
Normal file
1
test/unit/inner/slash/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
<a-i>/
|
1
test/unit/inner/slash/in
Normal file
1
test/unit/inner/slash/in
Normal file
|
@ -0,0 +1 @@
|
|||
foo(/%(b)ar/)
|
1
test/unit/inner/slash/selections
Normal file
1
test/unit/inner/slash/selections
Normal file
|
@ -0,0 +1 @@
|
|||
bar
|
Loading…
Reference in New Issue
Block a user