summaryrefslogtreecommitdiff
path: root/src/selectors.cc
diff options
context:
space:
mode:
authorpotatoalienof13 <potatoalienof13@gmail.com>2022-12-23 11:52:02 -0500
committerpotatoalienof13 <potatoalienof13@gmail.com>2022-12-26 09:17:06 -0500
commiteb447f1c43cf3f057ac8335ed87f2281c914e8ca (patch)
tree786665e9bdb93f11c03cbbdfecc7ff8fb88add6b /src/selectors.cc
parent7c2d060ec001c073cfd283d1f0e1089093ae9233 (diff)
Remove a check for inclusivity in select_to_reverse.
It turns out that neither <a-f> or <a-t> make sense when run at the beginning of the buffer. When I first created the check, I thought that <a-f> made sense if the character under the cursor was the character being searched for. I was wrong, <a-f> should always go at least one character backwards.
Diffstat (limited to 'src/selectors.cc')
-rw-r--r--src/selectors.cc5
1 files changed, 1 insertions, 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;