From f04a7a0ed309f346e7f9a1ad0bc601ee5c24c75d Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 26 Jul 2016 10:39:18 +0300 Subject: [PATCH] Allow selection primitives to use arbitrary punctuation signs --- src/normal.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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"