Skip to content

tui3: a question's own answer box reads the shared editing vocabulary (#1013) - #1031

Closed
santoshkumarradha wants to merge 1 commit into
devfrom
fix/1013-question-answer-box-chords
Closed

santoshkumarradha wants to merge 1 commit into
devfrom
fix/1013-question-answer-box-chords

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Fixes #1013.

The something else… row is a box — the one place on a question a person types
an answer of their own — and questionOtherKey routed its keys by hand, binding
only a short list. So cmd+←/cmd+→ never reached the ends of the line,
cmd+delete never killed to the line's start, and opt+delete/ctrl+delete
never deleted a word: the chords worked in the message box under the answer and
were silently dead in the answer. It is the defect editkeys.go was written for,
said about a box that had grown its own map.

Fix. The motions now go through editorMotion and the word kill through
editorWordKill — the one vocabulary every other box on the surface reads — and
kill-to-start is read under the two names the message box already binds
(ctrl+u, super+backspace). ctrl+w is deliberately still not the word kill
here: it shuts the tab in front everywhere on this surface, the same bargain the
message box makes.

  • internal/tui3/question.go — replace the hand-rolled motion/word-kill cases
    with the shared vocabulary; add the line kill.
  • internal/tui3/questionchords_test.go — the answer box takes the three word
    names, the two line-end names, and both word kills. Red before the fix
    (ctrl+left was not taken…, ctrl+u did not kill…), green after.
  • internal/manual/chat/questions.md — the box's paragraph now says what its
    editing keys do (the manual law).
  • docs/changes/unreleased/1013-question-answer-box-chords.md.

Verified. go test ./internal/tui3/ -run Question passes; make test-quick
(build, vet, fmt, packed corpus, changelog, manual gates, laws — the whole tree)
is green.

Drafted with agentfield ai · reviewed and owned by the author

…#1013)

The `something else…` row is a box — the one place on a question a person types
an answer of their own — and `questionOtherKey` routed its keys by hand, binding
only a short list. So `cmd+←`/`cmd+→` never reached the ends of the line,
`cmd+delete` never killed to the line's start, and `opt+delete`/`ctrl+delete`
never deleted a word: the chords worked in the message box under the answer and
were silently dead IN the answer. It is the defect editkeys.go was written for,
said about a box that had grown its own map.

The motions now go through `editorMotion` and the word kill through
`editorWordKill`, and kill-to-start is read under the two names the message box
binds (`ctrl+u`, `super+backspace`). `ctrl+w` stays the tab close it is
everywhere else.

- internal/tui3/question.go: replace the hand-rolled motion/word-kill cases with
  the shared vocabulary; add the line kill.
- internal/tui3/questionchords_test.go: the answers box takes the three word
  names, the two line-end names and both word kills; red before the fix.
- internal/manual/chat/questions.md: the box's paragraph says what its editing
  keys do.
- docs/changes/unreleased/1013-question-answer-box-chords.md.

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

Closing as a duplicate of #1032. Both fix #1013 (a question's own answer box not reading the shared caret vocabulary); the fix is the same shared-vocabulary change in internal/tui3/question.go. #1032 is the later commit (09:04 vs 09:01 on the same day) and also updates keys.md, so it is the one kept.

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

Labels

area:chat The v3 surface a person sits in front of (internal/tui3)

Projects

None yet

2 participants