Skip to content

Commit

Permalink
Improved "G" behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Mar 14, 2020
1 parent b95ff2f commit ba2a184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,10 @@ Set NO_COLOR=1 to 1 to disable colors.
// Check for if a special "first letter" has been pressed, which triggers vi-like behavior
if firstLetterSinceStart == "" {
firstLetterSinceStart = key
// If the first pressed key is "G", then invoke vi-compatible behavior and jump to the end
if key == "G" {
// If the first pressed key is "G" and this is not git mode, then invoke vi-compatible behavior and jump to the end
if key == "G" && !gitMode {
// Go to the end of the document
e.redraw = e.GoToLineNumber(e.Len()+1, c, status, true)
e.redraw = e.GoToLineNumber(e.Len(), c, status, true)
e.redrawCursor = true
firstLetterSinceStart = "x"
break
Expand Down

0 comments on commit ba2a184

Please sign in to comment.