mirror of
https://github.com/EnumeratedDev/Typer.git
synced 2025-07-01 07:48:20 +00:00
Fix buffer cursor reacting to up arrow in wrong cursor mode
This commit is contained in:
parent
7b140c4298
commit
df6d96234a
@ -226,12 +226,12 @@ func (window *Window) input(ev *tcell.EventKey) {
|
||||
window.SetCursorPos(window.CurrentBuffer.CursorPos - 1)
|
||||
}
|
||||
} else if ev.Key() == tcell.KeyUp {
|
||||
// Move cursor
|
||||
x, y := window.GetCursorPos2D()
|
||||
window.SetCursorPos2D(x, y-1)
|
||||
if window.CursorMode == CursorModeBuffer {
|
||||
// Get original cursor position
|
||||
pos := window.CurrentBuffer.CursorPos
|
||||
// Move cursor
|
||||
x, y := window.GetCursorPos2D()
|
||||
window.SetCursorPos2D(x, y-1)
|
||||
// Add to selection
|
||||
if ev.Modifiers() == tcell.ModShift {
|
||||
// Add to selection
|
||||
|
Loading…
x
Reference in New Issue
Block a user