Make Alt and a digit set the send target as /window does (closes #221)
check / check (push) Waiting to run
check / check (push) Waiting to run
In neoirc-cli, Alt and a digit switched the window but kept the send target, so typed text went to the window the user had left. The key now runs /window with that digit through the input handler. /window 0 now clears the send target. The status window has no target, but the command used to keep the previous one. Model: opus-5-5
This commit was merged in pull request #224.
This commit is contained in:
+5
-2
@@ -240,10 +240,13 @@ func (ui *UI) initKeyCapture() {
|
||||
return event
|
||||
}
|
||||
|
||||
// Alt and a digit runs /window with that digit.
|
||||
// SwitchBuffer alone would leave the target as it was.
|
||||
r := event.Rune()
|
||||
if r >= '0' && r <= '9' {
|
||||
idx := int(r - '0')
|
||||
ui.SwitchBuffer(idx)
|
||||
if ui.onInput != nil {
|
||||
ui.onInput("/window " + string(r))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user