From 3a13b3820f38e8caacde1b1a81fe196eadb6a7b3 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Thu, 9 Mar 2017 16:12:36 +0100 Subject: [PATCH] added jumping to top an bottom of file --- src/modes/Edit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modes/Edit.cpp b/src/modes/Edit.cpp index 7703bf0..4dff2b6 100644 --- a/src/modes/Edit.cpp +++ b/src/modes/Edit.cpp @@ -96,6 +96,14 @@ namespace groove { case '$': this->editor.x = this->editor.buffer->at(this->editor.y).size(); break; + case 'g': + this->editor.y = 0; + this->editor.offset = 0; + break; + case 'G': + this->editor.y = this->editor.buffer->size(); + this->editor.offset = this->editor.buffer->size() - LINES + 2; + break; } } }