summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-02-29 14:27:25 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-02-29 14:27:25 +0000
commit1f854bc0cc0410c90ddfc8a5cabfe33fbb3ba4bd (patch)
tree29ecaa8d37ce4ec3828b8aff7c793bcd4b133b7c /src
parent8275fe30f9d4534578040464766e2119874d4370 (diff)
fix select_surrounding when selection is on the closing char
Diffstat (limited to 'src')
-rw-r--r--src/selectors.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selectors.cc b/src/selectors.cc
index f6ca36ca..ead2ba63 100644
--- a/src/selectors.cc
+++ b/src/selectors.cc
@@ -250,7 +250,7 @@ SelectionAndCaptures select_surrounding(const Selection& selection,
BufferIterator first = selection.last();
while (not first.is_begin())
{
- if (*first == matching.second)
+ if (first != selection.last() and *first == matching.second)
++level;
else if (*first == matching.first)
{