diff options
author | Jan Hrastnik | 2020-10-05 13:47:15 +0000 |
---|---|---|
committer | Jan Hrastnik | 2020-10-05 13:47:15 +0000 |
commit | 7ccc4993f4814f72106de4882d00614fdc67ba13 (patch) | |
tree | 74c6d628cbf45534135d63044bd8b315556dad97 /helix-view | |
parent | b7ef7985ee0b163e2e9c352a98886d46429379c4 (diff) |
added ge command
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs index 63084520..43c27cb4 100644 --- a/helix-view/src/commands.rs +++ b/helix-view/src/commands.rs @@ -127,7 +127,7 @@ pub fn move_file_start(view: &mut View, _count: usize) { pub fn move_file_end(view: &mut View, _count: usize) { // TODO: use a transaction let text = &view.state.doc; - let last_line = text.char_to_line(text.len_lines().checked_sub(1).unwrap()); + let last_line = text.line_to_char(text.len_lines().checked_sub(1).unwrap()); view.state.selection = Selection::single(last_line, last_line); view.state.mode = Mode::Normal; |