Make Alt and a digit set the send target as /window does (closes #221)
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:
2026-10-28 01:30:33 +01:00
parent fe23bb5045
commit 967930f9bc
3 changed files with 66 additions and 2 deletions
+5 -2
View File
@@ -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
}