Make gh/gl extend selection in select mode
This commit is contained in:
parent
3cee0bf200
commit
9821beb5c4
1 changed files with 12 additions and 10 deletions
|
@ -1276,17 +1276,19 @@ pub fn goto_mode(cx: &mut Context) {
|
||||||
} = event
|
} = event
|
||||||
{
|
{
|
||||||
// TODO: temporarily show GOTO in the mode list
|
// TODO: temporarily show GOTO in the mode list
|
||||||
match ch {
|
match (cx.doc().mode, ch) {
|
||||||
'g' => move_file_start(cx),
|
(_, 'g') => move_file_start(cx),
|
||||||
'e' => move_file_end(cx),
|
(_, 'e') => move_file_end(cx),
|
||||||
'h' => move_line_start(cx),
|
(Mode::Normal, 'h') => move_line_start(cx),
|
||||||
'l' => move_line_end(cx),
|
(Mode::Normal, 'l') => move_line_end(cx),
|
||||||
'd' => goto_definition(cx),
|
(Mode::Select, 'h') => extend_line_start(cx),
|
||||||
'y' => goto_type_definition(cx),
|
(Mode::Select, 'l') => extend_line_end(cx),
|
||||||
'r' => goto_reference(cx),
|
(_, 'd') => goto_definition(cx),
|
||||||
'i' => goto_implementation(cx),
|
(_, 'y') => goto_type_definition(cx),
|
||||||
|
(_, 'r') => goto_reference(cx),
|
||||||
|
(_, 'i') => goto_implementation(cx),
|
||||||
|
|
||||||
't' | 'm' | 'b' => {
|
(_, 't') | (_, 'm') | (_, 'b') => {
|
||||||
let (view, doc) = cx.current();
|
let (view, doc) = cx.current();
|
||||||
|
|
||||||
let pos = doc.selection(view.id).cursor();
|
let pos = doc.selection(view.id).cursor();
|
||||||
|
|
Loading…
Reference in a new issue