Implement jump to start and end functionality
This commit is contained in:
parent
49465bb6f1
commit
ce8f6e0e82
|
@ -181,6 +181,15 @@ func main() {
|
|||
lowerBound += 1
|
||||
upperBound += 1
|
||||
}
|
||||
} else if ev.Key() == tcell.KeyCtrlE || ev.Key() == tcell.KeyEnd {
|
||||
upperBound = len(*input)
|
||||
lowerBound = upperBound - ymax + 2
|
||||
currentLine = len(*input) - 1
|
||||
} else if ev.Key() == tcell.KeyCtrlA || ev.Key() == tcell.KeyHome {
|
||||
upperBound = ymax - 2
|
||||
lowerBound = 0
|
||||
currentLine = 0
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue