From b6e20af056ff9968d6493cca7a8471b2d873281e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 19 Feb 2020 23:48:47 +0200 Subject: Always set cursor to end when switching edit message --- ui/room-view.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/room-view.go b/ui/room-view.go index 8132b8c..126f1ff 100644 --- a/ui/room-view.go +++ b/ui/room-view.go @@ -380,6 +380,7 @@ func (view *RoomView) SetEditing(evt *event.Event) { view.input.SetText(text) } view.status.SetText(view.GetStatus()) + view.input.SetCursorOffset(-1) } func (view *RoomView) findMessageToEdit(forward bool) *event.Event { @@ -409,14 +410,12 @@ func (view *RoomView) EditNext() { } foundEvent := view.findMessageToEdit(true) view.SetEditing(foundEvent) - view.input.SetCursorOffset(-1) } func (view *RoomView) EditPrevious() { foundEvent := view.findMessageToEdit(false) if foundEvent != nil { view.SetEditing(foundEvent) - view.input.SetCursorOffset(0) } } -- cgit v1.2.3