src: Make sure the iterator is inbound before decrementing it

Fixes #2966
This commit is contained in:
Frank LENORMAND 2019-06-14 09:17:54 +03:00
parent 85e2dc6252
commit 936c21da70

View File

@ -799,7 +799,7 @@ select_argument(const Context& context, const Selection& selection,
skip_while_reverse(end, begin, is_blank);
}
// get starting delimiter for non inner last arg
else if (not first_arg and last_arg)
else if (not first_arg and last_arg and begin != buffer.begin())
--begin;
if (end == buffer.end())