fix select_surrounding when selection is on the closing char

This commit is contained in:
Maxime Coste 2012-02-29 14:27:25 +00:00
parent 8275fe30f9
commit 1f854bc0cc

View File

@ -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)
{