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

Plugin redraws screen when leaving nvim focus in tmux marking the window as having new activity #15

Open
erikw opened this issue Dec 15, 2022 · 8 comments

Comments

@erikw
Copy link

erikw commented Dec 15, 2022

Hey,

this is a cool plugin, it's useful! However I've needed to disable it unfortunately as it does not play well with tmux. When switching to another window in tmux, it seems like the window just left where nvim is, that this plugin redraws the screen. This causes tmux to alert that something has changed (new output) in the window that was just left, and also marking it as having new activity in the window list.

See the attached video for a demonstration.

Screen.Recording.2022-12-15.at.13.52.33.mov

The expected behavior, which is the case when this plugin is not used in nvim, is that there is no nvim activity when leaving the window, thus no false activity notifications.

Maybe nvim-numbertoggle redraws the screen all the time?

My system:
nvim: 0.8.1
OS: macOS 12.6
nvim-numbertoggle: latest version

@sitiom
Copy link
Owner

sitiom commented Dec 15, 2022

Maybe nvim-numbertoggle redraws the screen all the time?

You're right, it should only redraw on CmdlineEnter.

@sitiom sitiom closed this as completed in 4268ac4 Dec 15, 2022
@sitiom
Copy link
Owner

sitiom commented Dec 15, 2022

Let me know if that fixes the issue 👍

@erikw
Copy link
Author

erikw commented Dec 15, 2022

@sitiom Hey thanks for looking in to this so quickly!

I updated the plugin to the latest version (main branch) but unfortunately the behavior is the same as in the video above :(

@sitiom
Copy link
Owner

sitiom commented Dec 16, 2022

That's weird. At this point, it should only redraw on CmdlineEnter. Perhaps it's not something else that is the issue? Can you try using https://github.com/jeffkreeftmeijer/vim-numbertoggle and see if the same issue exists on that plugin?

I don't use tmux, so help would be pretty much appreciated.

@sitiom sitiom reopened this Dec 16, 2022
@erikw
Copy link
Author

erikw commented Dec 16, 2022

Can you try using https://github.com/jeffkreeftmeijer/vim-numbertoggle and see if the same issue exists on that plugin?

Yes this plugin also have the exact same behaviour as in the original video above :)

I don't use tmux, so help would be pretty much appreciated.

(I recommend it, a true life-safer ;))

@sitiom
Copy link
Owner

sitiom commented Dec 16, 2022

Can you try using https://github.com/jeffkreeftmeijer/vim-numbertoggle and see if the same issue exists on that plugin?

Yes this plugin also have the exact same behaviour as in the original video above :)

Hmm, then I'm not sure what I can do. It is the plugin's behavior to set the line numbering to absolute when focus is lost, which would do a redraw. I don't know if there's a way to check for this specific use case. You might want to open an issue on the other repo as well and see if they have a bright idea.

@rockyzhang24
Copy link

I'm using this plugin with tmux. Both them work well on my side.

My system:
nvim: 0.9
OS: macOS
tmux: next-3.4

@kevintraver
Copy link

the issue seems to be with redraw and other plugins that manage multiple windows:

Is redrawing necessary?

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

No branches or pull requests

4 participants