From 1f854bc0cc0410c90ddfc8a5cabfe33fbb3ba4bd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 29 Feb 2012 14:27:25 +0000 Subject: [PATCH] fix select_surrounding when selection is on the closing char --- src/selectors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {