1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 12:07:23 +00:00

updated to have lastChat var and new keybinding for CTRL+z

This commit is contained in:
2019-10-29 15:37:01 -06:00
parent 4a7818c79e
commit 5e6e97d7f6

View File

@ -22,6 +22,7 @@ var (
channels []keybase.Channel channels []keybase.Channel
stream = false stream = false
lastMessage keybase.ChatAPI lastMessage keybase.ChatAPI
lastChat = ""
g *gocui.Gui g *gocui.Gui
) )
@ -124,6 +125,13 @@ func initKeybindings() error {
}); err != nil { }); err != nil {
return err return err
} }
if err := g.SetKeybinding("", gocui.KeyCtrlZ, gocui.ModNone,
func(g *gocui.Gui, v *gocui.View) error {
cmdJoin([]string{"/join", lastChat})
return nil
}); err != nil {
return err
}
if err := g.SetKeybinding("Edit", gocui.KeyCtrlC, gocui.ModNone, if err := g.SetKeybinding("Edit", gocui.KeyCtrlC, gocui.ModNone,
func(g *gocui.Gui, v *gocui.View) error { func(g *gocui.Gui, v *gocui.View) error {
popupView("Chat") popupView("Chat")