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

Make magit-toggle-text-mode work in git-rebase-mode buffers #823

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

emlun
Copy link
Contributor

@emlun emlun commented Jul 12, 2024

evil-collection-magit-toggle-text-mode currently doesn't work in git-rebase-mode buffers, as the cond checks only for 'magit-mode. Thus the function just shows the error "evil-collection-magit-toggle-text-mode unexpected state" if invoked in a git-rebase-mode buffer. The C-t and \ bindings are also not set while in this mode.

These changes make evil-collection-magit-toggle-text-mode also work in git-rebase-mode, and set up the same key bindings in this mode. Because git-rebase-mode also enables read-only-mode in the buffer, we need to disable that too when switching to text-mode.

Magit's git-rebase-mode uses a different mode and a different keymap from the
main Magit buffer. toggle-text-mode also needs to disable read-only-mode in
rebase-mode buffers.
@emlun emlun changed the title Make toggle-text-mode work in git-rebase-mode buffers Make magit-toggle-text-mode work in git-rebase-mode buffers Jul 12, 2024
@condy0919 condy0919 merged commit e49d8e9 into emacs-evil:master Aug 5, 2024
7 of 12 checks passed
@emlun emlun deleted the git-rebase-text-mode branch August 5, 2024 16:35
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.

2 participants