WSL port: land checkpoint 7 on main (quit chord + its test)

Merged
JA
3mo ago
+173-41

Mechanical follow-up, no new code — this moves already-reviewed, already-merged
work onto main.

What happened

#14 was merged, but into wsl/06-install-in-place, not main. GitHub
retargets a stacked PR to main only when its base branch is merged and
deleted
; #12 merged but left wsl/06-install-in-place in place, so #14 kept
its original base and landed there.

Result: all 8 PRs show MERGED, but main is 9 commits short of the finished
port.

Contents

Exactly checkpoint 7 plus its merge commit — the WSL quit chord, its test, and
the documentation corrections:

219abcb Merge pull request #14 from jainal09/wsl/07-quit-legacy
69b5867 Test the WSL quit fallback, and stop calling Ctrl+Q a free key in python
4709cdc Document the terminal-mode quit, and stop citing the old label
0af6a65 Bring the checklist in line with what the quit chord actually does
ee0e175 Stop promising a normal-mode quit that WSL cannot deliver
226b9cf Correct two accounts in TODO that the code has since disproved
1c3c42f Make each gate say what it actually checks
06cb699 Bind the WSL quit fallback in terminal mode too
07e6232 Bind the quit chord that WSL actually sends

Every one of these was reviewed on #14 by CodeRabbit, Greptile, cubic, CodeScene
and Codex, with all threads resolved. Nothing is new here.

Verification

./tests/run.sh passes on this branch, including the two new
wsl_quit_fallback_* assertions that cover the binding this checkpoint adds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WveBqAyhoM49p9gWfwBDBx


Summary by cubic

Ports checkpoint 7 to main: makes the quit chord work on WSL by binding <C-q> to the quit prompt in insert and terminal mode, and clarifies the fallback is WSL‑gated. No behavior change off WSL.

  • Bug Fixes

    • WSL: map <C-q> to the quit prompt in insert and terminal mode; normal mode stays visual block.
    • Gate on WSL (not CSI‑u); WSL sessions that do speak CSI‑u still get the insert/terminal <C-q> binding; :qa! remains for normal mode.
  • Tests and Docs

    • Adds wsl_quit_fallback_* assertions to ensure the binding exists only on WSL.
    • Updates KEYS.md, docs/wsl.md, TODO.md, and consolidates overlapping notes in nvimrc.lua into one clear block; documents WSL gating, terminal‑mode coverage, and the normal‑mode trade‑off.

Summary by CodeRabbit

  • New Features

    • Added a WSL-specific fallback allowing Ctrl+Q to trigger quit confirmation in insert and terminal modes.
    • Preserved Ctrl+Q visual-block selection behavior in normal mode.
    • Limited the fallback to WSL environments.
  • Documentation

    • Expanded WSL guidance covering terminal behavior, configuration, trade-offs, limitations, installation, clipboard support, and validation steps.
  • Tests

    • Added automated checks verifying the WSL-specific key mappings.

Greptile Summary

This PR ports the previously reviewed WSL quit fallback onto main.

  • Binds legacy <C-q> to the existing quit confirmation in insert and terminal modes on WSL.
  • Preserves normal-mode <C-q> for visual-block selection.
  • Adds mapping assertions and updates the WSL, keybinding, and checkpoint documentation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

FilenameOverview
nvimrc.luaAdds the WSL-gated legacy quit chord by reusing the existing confirmed quit callback in insert and terminal modes.
tests/suite_options.shVerifies that the fallback mappings are present on WSL and absent on other Linux environments.
docs/wsl.mdDocuments legacy terminal encoding, the WSL fallback, and the intentional normal-mode limitation.
KEYS.mdUpdates the public keybinding guide with the WSL-specific quit behavior and trade-offs.
TODO.mdRecords the measured quit-chord behavior and aligns checkpoint descriptions with the implemented fallback.

Reviews (4): Last reviewed commit: "Fold three overlapping paragraphs into o..." | Re-trigger Greptile