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

More info list buffers #1084

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

RubenAstudillo
Copy link

This branch makes the Buffer List mode more Emacs like. Now there is only a single Buffer List instance, we can flag files for Deletetion and eXecution, set readonly status and unset flags via the usual keys from emacs.

On a technical side, I had to change the function to work on BufferRef instead of BufferId otherwise when eXecuting buffer, if two shared the same infix name (as is common with dired buffers) it would kill them all. As no extra state can be had on a mode, I had to put the BufferRef on the BufferList on the second column. It is hack-ish but works, plus I didn't have to deal with invisible buffers as in Emacs.

@quickdudley
Copy link
Contributor

The main issue this seems to be addressing is present in both the emacs and vim keymaps: but your PR only seems to fix it in the emacs keymap. Maybe in the weekend I'll have a look and see if I can address that.

@RubenAstudillo
Copy link
Author

I haven't studied how the :buffers command is implemented on the vim keymap. I will look how much code both modules can share.

For now is just a read-only flag and the current buffer flag.
Fow now we put the BufferRef on the *Buffer List* althought this can be
confusing for users. The alternative is to extend the ADT to hold some
state per mode or the use of invisible buffers a lá Emacs.
This command changes the behaviour of the old 'KEnter' event as it
doesn't set ReadOnly = False when switching. This flag set/unsets with
the same command. Also documented most of the new functions on this
module.
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