@@ -1032,6 +1032,16 @@ pub fn normal_mode(cx: &mut Context) {
10321032}
10331033
10341034pub fn goto_mode(cx: &mut Context) {
1035+ let count = cx.count;
1036+ if count > 1 {
1037+ // TODO: can't go to line 1 since we can't distinguish between g and 1g, g gets converted
1038+ // to 1g
1039+ let doc = cx.doc();
1040+ let pos = doc.text().line_to_char(count - 1);
1041+ doc.set_selection(Selection::point(pos));
1042+ return;
1043+ }
1044+
10351045 cx.on_next_key(move |cx, event| {
10361046 if let KeyEvent {
10371047 code: KeyCode::Char(ch),