From 0acb350619c80b4ac47bfd317460b0b0545e19d4 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Wed, 15 Mar 2017 14:30:49 +0300 Subject: [PATCH] src: Make the cursor character an opening delimiter This commit allows the editor to consider the character under the cursor as an opening delimiter when using an object selector, instead of ignoring it and looking for one before the cursor. --- src/selectors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selectors.cc b/src/selectors.cc index a4f8b9d6..5ab25e5d 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -295,7 +295,7 @@ find_surrounding(Iterator begin, Iterator end, const bool nestable = opening != closing; auto first = pos; - if (to_begin) + if (to_begin and opening != *pos) { using RevIt = std::reverse_iterator; auto res = find_closing(RevIt{pos+1}, RevIt{begin},