do_go: support append mode on go to top/bottom, ignore case
This commit is contained in:
parent
6cc4ec796e
commit
9ca69820ac
|
@ -70,26 +70,24 @@ void do_go(Context& context)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Editor& editor = context.editor();
|
Editor& editor = context.editor();
|
||||||
switch (key.key)
|
switch (tolower(key.key))
|
||||||
{
|
{
|
||||||
case 'g':
|
case 'g':
|
||||||
case 't':
|
case 't':
|
||||||
context.push_jump();
|
context.push_jump();
|
||||||
editor.select(editor.buffer().begin());
|
editor.select(editor.buffer().begin(), mode);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
case 'L':
|
|
||||||
editor.select(select_to_eol, mode);
|
editor.select(select_to_eol, mode);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
case 'H':
|
|
||||||
editor.select(select_to_eol_reverse, mode);
|
editor.select(select_to_eol_reverse, mode);
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
{
|
{
|
||||||
context.push_jump();
|
context.push_jump();
|
||||||
const Buffer& buf = editor.buffer();
|
const Buffer& buf = editor.buffer();
|
||||||
editor.select(buf.iterator_at_line_begin(buf.line_count() - 1));
|
editor.select(buf.iterator_at_line_begin(buf.line_count() - 1), mode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user