diff --git a/src/normal.cc b/src/normal.cc index 50f7ca61..288b70e5 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -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(context, std::bind(select_surrounding, _1, _2, + strview_codepoint, strview_codepoint, + level, flags)); + } }, get_title(), "b,(,): parenthesis block\n" "B,{,}: braces block \n" diff --git a/test/unit/around/slash/cmd b/test/unit/around/slash/cmd new file mode 100644 index 00000000..3b264409 --- /dev/null +++ b/test/unit/around/slash/cmd @@ -0,0 +1 @@ +/ diff --git a/test/unit/around/slash/in b/test/unit/around/slash/in new file mode 100644 index 00000000..d6b8a544 --- /dev/null +++ b/test/unit/around/slash/in @@ -0,0 +1 @@ +foo(/%(b)ar/) diff --git a/test/unit/around/slash/selections b/test/unit/around/slash/selections new file mode 100644 index 00000000..a5a08411 --- /dev/null +++ b/test/unit/around/slash/selections @@ -0,0 +1 @@ +/bar/ diff --git a/test/unit/inner/slash/cmd b/test/unit/inner/slash/cmd new file mode 100644 index 00000000..753eb6b7 --- /dev/null +++ b/test/unit/inner/slash/cmd @@ -0,0 +1 @@ +/ diff --git a/test/unit/inner/slash/in b/test/unit/inner/slash/in new file mode 100644 index 00000000..d6b8a544 --- /dev/null +++ b/test/unit/inner/slash/in @@ -0,0 +1 @@ +foo(/%(b)ar/) diff --git a/test/unit/inner/slash/selections b/test/unit/inner/slash/selections new file mode 100644 index 00000000..5716ca59 --- /dev/null +++ b/test/unit/inner/slash/selections @@ -0,0 +1 @@ +bar