Просмотр исходного кода

Change focus back to messages TextView when Escape is pressed

ayntgl 4 лет назад
Родитель
Сommit
3a7e0b4c82
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      ui/handlers.go

+ 3 - 1
ui/handlers.go

@@ -220,7 +220,9 @@ func onMessagesTextViewInputCapture(app *App, e *tcell.EventKey) *tcell.EventKey
 			AddItem("Copy Content", "", 'c', nil).
 			AddItem("Copy ID", "", 'i', nil).
 			SetDoneFunc(func() {
-				app.SetRoot(app.MainFlex, true)
+				app.
+					SetRoot(app.MainFlex, true).
+					SetFocus(app.MessagesTextView)
 			}).
 			SetSelectedFunc(func(_ int, mainText string, _ string, _ rune) {
 				onMessageActionsListSelected(app, mainText, m)