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

Hide Flutter dev log from buffers list. #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

divan
Copy link

@divan divan commented May 22, 2022

Flutter dev log buffer is appearing in the buffer list with a filename 'FLUTTER_DEV_LOG'. It's handy to keep that buffer visible (in a split window), but it causes problems when cycling through buffers or resizing it.

This PR sets 'buflisted' property to false, so the buffer is not listed.

This will probably require implementing some kind of log window toggling (discussed in #84).

In general, this echoes abovementioned issue in a way to bring more consistency between log and outline windows for this plugin.

@akinsho
Copy link
Collaborator

akinsho commented May 22, 2022

@divan thanks for the PR, so this is actually an intentional choice to keep it visible in the list, primarily because people regularly do things like copying from the log or just needing it to be visible to refer back to. I think as you say if there was a consistent way to toggle it reliably in all cases then it wouldn't be needed, but it feels like this should come after that.
If this is taken away now without a toggle function, users will not be able to find the buffer without a bunch of faff.

@divan
Copy link
Author

divan commented May 22, 2022

@akinsho totally agree. I'll try to work a bit on toggling. So far my understanding is that split and tabs modes are quite different. Split mode should be identical to outline (UX-wise). Tab mode is completely different.
If that's correct, than the challenge is to distinguish those to modes and apply different set of buffer configurations.

@akinsho
Copy link
Collaborator

akinsho commented May 22, 2022

@divan I would actually approach more simply and regardless of a user's configuration if they are toggling then it will be a split, but the command should be named as such e.g. toggle split. I would basically open a split window and track the ID and so if they hit toggle again and the window is still open in any tabpage then close it. If it isn't open in any tabpage then open it in the current one. I guess you'll also need to keep track of the buffer number which should be consistent regardless of the tab, so you can open it when toggling it open

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