From eb447f1c43cf3f057ac8335ed87f2281c914e8ca Mon Sep 17 00:00:00 2001 From: potatoalienof13 Date: Fri, 23 Dec 2022 11:52:02 -0500 Subject: [PATCH] Remove a check for inclusivity in select_to_reverse. It turns out that neither or make sense when run at the beginning of the buffer. When I first created the check, I thought that made sense if the character under the cursor was the character being searched for. I was wrong, should always go at least one character backwards. --- src/selectors.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/selectors.cc b/src/selectors.cc index febcde78..4769c19e 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -423,11 +423,8 @@ select_to_reverse(const Context& context, const Selection& selection, // if we are selecting backwards from the beginning of the buffer, // there is nothing more that can be selected. - // Unless its inclusive, in which its possible that the current - // location of the cursor contains the Codepoint being looked for. - if(!inclusive && selection.cursor() == buffer.begin()){ + if (selection.cursor() == buffer.begin()) return {}; - } Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; Utf8Iterator end = begin;