Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul command-line window #1830

Merged
merged 4 commits into from
Aug 27, 2023
Merged

Conversation

axelf4
Copy link
Collaborator

@axelf4 axelf4 commented Aug 25, 2023

See the individual commits.

There was a lot of duplication between evil-ex-completion-map and
evil-ex-search-keymap, which meant that any rebinds had to be done
twice. This commit fixes that by introducing evil-command-line-map as
a common ancestor of the two keymaps.

Also renames evil-ex-map to evil-ex-shortcut-map to avoid confusion,
as its purpose is more niche than evil-ex-completion-map which
functions the same as any other keymap passed to read-from-minibuffer.
Pressing C-f while editing an Ex command to open the command-line
window and later quitting that window used to not reselect the Ex
command line, but instead just continue the recursive edit in some
previous window. This was specially confusing before commit
02004bc, as the evil-ex-abort hack
did not trigger, leaving you in a bad state with
evil-ex-current-buffer set to t.

This commit fixes that by setting the delete-window window parameter
on the command-line window to a function that switches back to the
minibuffer after deleting the window, which closes emacs-evil#1379.

This commit also replaces the split-window call with a display-buffer
invocation, to always spawn the window at the bottom of the frame, but
also allow the user to override this behavior.
Introspection of the current minibuffer argument history and prompt is
possible, hence there is no need for the specialized
evil-ex-command-window and evil-ex-search-command-window functions.
@axelf4 axelf4 merged commit 657af37 into emacs-evil:master Aug 27, 2023
4 checks passed
@axelf4 axelf4 deleted the overhaul-cmdwin branch August 27, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant