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

Closing the log window with :q! remove syntax highlighting #586

Closed
Olical opened this issue Jul 6, 2024 · 3 comments
Closed

Closing the log window with :q! remove syntax highlighting #586

Olical opened this issue Jul 6, 2024 · 3 comments
Labels
bug Something isn't working fixed-pending-release

Comments

@Olical
Copy link
Owner

Olical commented Jul 6, 2024

As reported by Max Savchenko on Discord:

I'm observing strange behaviour: if I close conjure buffer with :q! and then open a new one—it lacks syntax colors although it has ft=clojure in it. it gets fixed with :set ft=clojure

if i close buffer with g:conjure#mapping#log_close_visible everything is fine of course

I suspect the ! suffix is killing the buffer in some way, or maybe clearing it's buffer local settings without deleting the buffer. It's some sort of half dead state so Conjure isn't re-creating the buffer with all of the right options set in this case like it normally would.

@Olical Olical added the bug Something isn't working label Jul 6, 2024
@Olical
Copy link
Owner Author

Olical commented Jul 6, 2024

Interestingly, bdelete doesn't cause this issue. quit is fine too, it's only quit! that seems to break the buffer. The :help on this call is:

:q[uit]!		Quit without writing, also when the current buffer has
			changes.  The buffer is unloaded, also when it has
			'hidden' set.
			If this is the last window and there is a modified
			hidden buffer, the current buffer is abandoned and the
			first changed hidden buffer becomes the current
			buffer.
			Use ":qall!" to exit always.

It mentions that it unloads a buffer even if it has hidden set. So maybe it's "unloading" and not deleting the buffer?

@Olical
Copy link
Owner Author

Olical commented Jul 6, 2024

Yep! :bunload reproduces the issue too! So we just have to check if the buffer is loaded or not. If it's not then we need to re-initialise.

@macovsky
Copy link

macovsky commented Jul 7, 2024

thanks for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-pending-release
Projects
None yet
Development

No branches or pull requests

2 participants