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.
This commit is contained in:
parent
5a403a9611
commit
0acb350619
|
@ -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<Iterator>;
|
||||
auto res = find_closing(RevIt{pos+1}, RevIt{begin},
|
||||
|
|
Loading…
Reference in New Issue
Block a user