<a-t> should not succeed when run on the first character of a file.
This commit is contained in:
parent
86bd4efd25
commit
1a4737cd20
|
@ -420,6 +420,15 @@ select_to_reverse(const Context& context, const Selection& selection,
|
||||||
Codepoint c, int count, bool inclusive)
|
Codepoint c, int count, bool inclusive)
|
||||||
{
|
{
|
||||||
auto& buffer = context.buffer();
|
auto& buffer = context.buffer();
|
||||||
|
|
||||||
|
// 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()){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer};
|
Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer};
|
||||||
Utf8Iterator end = begin;
|
Utf8Iterator end = begin;
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user