Skip to content

tui3, manual: a question's own answer box answers to the whole caret vocabulary - #1032

Closed
santoshkumarradha wants to merge 1 commit into
devfrom
fix/question-answer-box-caret-keys
Closed

santoshkumarradha wants to merge 1 commit into
devfrom
fix/question-answer-box-caret-keys

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Fixes #1013.

questionOtherKey routed keys by hand and bound a short list, so in a question's own answer box the usual text-editing keys did nothing: cmd+←/cmd+→ never reached the ends of the line, cmd+delete never killed to the line start, and opt+delete/ctrl+delete never deleted a word — while the message box directly beneath the question answered to every one of them.

The row now reads the surface's one word-and-line vocabulary (editorMotion / editorWordKill in internal/tui3/editkeys.go), the same door every other box on the surface goes through, and gains the line kill's two names (ctrl+u, super+backspace). ctrl+w stays out on purpose: on this surface it shuts the tab in front.

  • internal/tui3/question.go — the routing; the hand-rolled chord list is gone.
  • internal/tui3/question_test.go — a new test walks every chord family (cmd/super/opt/ctrl + ←→, ctrl+a/ctrl+e, ctrl+u, cmd/opt/ctrl+delete) through the row's own box, asserts the edit is not reaching the message box, and checks the edited words still travel as the answer.
  • internal/manual/chat/keys.md + questions.md — the box is now on the list of boxes that answer the caret vocabulary (the manual law).

Checks

  • go test ./internal/tui3/ -run Question — passes.
  • Each new family was proved to bite: disabling only the motion guard, only the word kill, or only the line kill each turns the new test red, with the chord named in the failure.
  • The pr-ready light gate passed whole (build, vet, fmt, changelog, manual gates, laws, every package). Its heavy half (test-touched → ./internal/tui3) refused to start because another session holds the box's heavy-suite lock (pid 94903); the focused -run Question run above is the evidence for the touched package.

Drafted with agentfield ai · reviewed and owned by the author

…vocabulary

`questionOtherKey` routed keys by hand and bound a short list, so in a
question's own answer box the usual text-editing keys did nothing: cmd-left/right
never reached the ends of the line, cmd-delete never killed to the line start,
and opt-delete/ctrl-delete never deleted a word — while the message box directly
beneath the question answered to every one of them.

The box now reads the surface's one word-and-line vocabulary
(`editorMotion`/`editorWordKill`, editkeys.go) the way every other box does, and
gains the line kill's two names (`ctrl+u`, `super+backspace`). `ctrl+w` stays out
on purpose: it shuts the tab in front.

The manual gains the box on the list of boxes that answer the caret vocabulary,
`questions.md` says so at the `something else…` row, and a new test walks every
chord family through the row's own box.

Co-Authored-By: aforge <[email protected]>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@santoshkumarradha

Copy link
Copy Markdown
Member Author

Merged into the santos/dev accumulation branch (not into dev directly); the work is preserved there and will reach dev in a single PR later. Closing the PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants