fix: prevent Herdr from swallowing Escape#17
Merged
Conversation
Turn off Herdr's host mouse capture ([ui] mouse_capture = false) and set Neovim mouse off (o.mouse = ''). Herdr computes should_capture_host_mouse as ui.mouse_capture || pane_requests_mouse, so both halves are required: with either side leaving mouse on, a trackpad event can tailgate a held Escape and get swallowed in the pane (e.g. Neovim stuck in insert mode).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Ship both required halves of the verified Herdr Escape-swallow mitigation to this public teaching dotfiles repo so it is actually effective for viewers who follow this setup. Herdr computes should_capture_host_mouse = ui.mouse_capture || pane_requests_mouse, so the mitigation only works when host mouse capture is off on BOTH sides: (1) Herdr's own config (home/.config/herdr/config.toml) - add a new [ui] table with mouse_capture = false; and (2) the pane side, Neovim (home/.config/nvim/lua/vim_config.lua) which currently defaults to mouse-on - add o.mouse = '' in the existing 'local o = vim.opt' / o. style. Deliberate decisions: exactly these two additions, nothing else; each carries a short explanatory comment matching each file's existing comment style; no other files touched; do not rewrite historical recorded video-source/snippet content (none exists in this repo); no AGENTS.md/CLAUDE.md agent files added; .no-mistakes/ stays untracked. A Herdr-only change would be a no-op here because Neovim defaults to mouse-on, which is exactly why both halves are required.
What Changed
Risk Assessment
✅ Low: The change is narrowly scoped, uses valid configuration patterns, and consistently disables both Herdr host capture and Neovim pane mouse reporting without introducing a material regression.
Testing
After an initial overlong-socket-path setup failure was corrected with isolated worktree-local sockets, Herdr 0.7.3 accepted and live-reloaded the shipped configuration without diagnostics, Neovim 0.12.0 evaluated the shipped configuration with mouse disabled, deployment wiring for both files was confirmed, runtime evidence was captured, and the worktree was left clean.
Evidence: Escape mitigation runtime evidence
Herdr reload: statusapplied, diagnostics[]. Neovim runtime:vim.opt.mouse = {}. Combined state: Herdr host capture disabled and Neovim mouse disabled.Evidence: Herdr server runtime log
Herdr startup, reload, and clean shutdown log.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git diff --stat f068d43326867f8b531526d9b5fffbf6a02072c0..a0f8972b367f4edbbfda5f8fb35dadc1d8e2831band the corresponding full diff to confirm only the intended two files changedStarted Herdr 0.7.3 withHERDR_CONFIG_PATH=$PWD/home/.config/herdr/config.tomland isolated worktree-local socketsRanherdr server reload-configagainst the isolated server and observedstatus: appliedwith no diagnosticsRannvim --clean --headless -u NONEwith the repositoryvim_config.luasourced and observedvim.opt.mouse = {}Verifiedhome.nixdeploys both repository configuration directories through Home Manager out-of-store symlinksStopped the isolated Herdr server, removed its worktree-local sockets, and verified the working tree remained clean✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.