From 936c21da700534d55a779faba9d79da97c51c6df Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 14 Jun 2019 09:17:54 +0300 Subject: [PATCH] src: Make sure the iterator is inbound before decrementing it Fixes #2966 --- src/selectors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selectors.cc b/src/selectors.cc index c6bb1901..9649c6c1 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -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())