Repository navigation
Let a prefix argument keep copy and Emacs mode from fast-exiting - #771
Merged
Merged
Conversation
ghostel-copy-mode, ghostel-emacs-mode and ghostel-readonly-enter take a prefix argument. Entering with one turns ghostel-readonly-fast-exit off for that visit; a prefix inside the mode toggles it instead of exiting. The effective value lives in the buffer-local ghostel--readonly-fast-exit, set on entry, which every runtime reader consults instead of the user option. The Emacs-mode entry message reflects it like the copy-mode one. All defcustom setters iterate ghostel-buffer-list.
This branch was previously deployed
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.
ghostel-copy-mode,ghostel-emacs-modeandghostel-readonly-entertake a prefix argument. Entering with one turnsghostel-readonly-fast-exitoff for that visit, so stray letters hit the read-only barrier instead of landing at the prompt. A prefix while already in the mode toggles fast exit instead of exiting.The effective value is a buffer-local,
ghostel--readonly-fast-exit, set inghostel--enter-readonly. Every former runtime reader of the option (ghostel--on-user-input, keymap choice,ghostel-readonly-copy, mode-line help-echo, entry message) reads the local, soC-y,M-wand middle-click respect the override too. The Emacs-mode entry message now names the exit key the same way copy mode does.All defcustom setters iterate
ghostel-buffer-list.Verified live under elate with zsh:
C-u C-c C-tenters copy mode with the plain map,agives "Buffer is read-only",C-u C-c C-tflips to fast exit while staying in copy mode,C-c C-ekeeps it,qexits;C-u C-c C-eplusC-ystays in Emacs mode.