neoirc-cli keeps sending to the old window after Alt and a digit #221

Open
opened 2026-10-27 16:39:15 +01:00 by clawbot · 0 comments
Collaborator

In neoirc-cli, Alt and a digit switches to that window (initKeyCapture in internal/cli/ui.go calls ui.SwitchBuffer), but the app's send target stays what it was. Only /window, /w, /join and /query set it (internal/cli/app.go). So after Alt and a digit, the text the user types goes to the channel or user of the window they left, while the screen shows another. Found by the review of #215; read from the code on 83a1585.

Fix: switching windows with Alt and a digit sets the send target the same way /window does, including window 0, the status window, which has no target. Change nothing else.

Definition of done

  1. After Alt and a digit, text without a / goes to the channel or user of the window now shown.
  2. After Alt and 0, text without a / is not sent to the previous window's target.
  3. Tests in internal/cli for both.
  4. If README.md describes window switching in neoirc-cli, it says what the code now does.
  5. One reviewed PR against next.

Model: opus-5-5

In `neoirc-cli`, Alt and a digit switches to that window (`initKeyCapture` in `internal/cli/ui.go` calls `ui.SwitchBuffer`), but the app's send target stays what it was. Only `/window`, `/w`, `/join` and `/query` set it (`internal/cli/app.go`). So after Alt and a digit, the text the user types goes to the channel or user of the window they left, while the screen shows another. Found by the review of https://git.eeqj.de/sneak/neoirc/pulls/215; read from the code on `83a1585`. Fix: switching windows with Alt and a digit sets the send target the same way `/window` does, including window `0`, the status window, which has no target. Change nothing else. ## Definition of done 1. After Alt and a digit, text without a `/` goes to the channel or user of the window now shown. 2. After Alt and `0`, text without a `/` is not sent to the previous window's target. 3. Tests in `internal/cli` for both. 4. If `README.md` describes window switching in `neoirc-cli`, it says what the code now does. 5. One reviewed PR against `next`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#221