-
Notifications
You must be signed in to change notification settings - Fork 474
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
Bug: Refresh Settings Ignored #1293
Comments
Trying something along these lines function M.disable_lualine_autocommands()
-- Clear autocommands for Lualine's groups
vim.cmd([[
augroup lualine_stl_refresh
autocmd! BufWritePost,BufEnter
augroup END
augroup lualine_tal_refresh
autocmd! BufWritePost,BufEnter
augroup END
augroup lualine_wb_refresh
autocmd! BufWritePost,BufEnter
augroup END
]])
end
But doesn't have to have the desired effect as well - I see these are hardcoded that might be causing the issues? Line 318 in 544dd15
-- The events on which lualine redraws itself
local default_refresh_events =
'WinEnter,BufEnter,BufWritePost,SessionLoadPost,FileChangedShellPost,VimResized,Filetype,CursorMoved,CursorMovedI,ModeChanged' |
Also is this expected? I am seeing this - M.get_hl_diff call rate: 460.00 calls/minute (Total calls: 92, Elapsed time: 0.20 minutes)
M.get_hl_diff call rate: 1191.43 calls/minute (Total calls: 556, Elapsed time: 0.47 minutes)
M.get_hl_diff call rate: 1632.00 calls/minute (Total calls: 1904, Elapsed time: 1.17 minutes) Every single function in the config is called this frequently? For people with the diff component for e.g won't that be the plugin makes a git syscall on the filesystem with such high frequency? Not sure if I am missing any settings or if this is expected - for me currently there seem to be a lot of redundant calls in excess |
By it's not guaranteed it means that it can refresh more often based on other factors other than the refresh rate. Basically it'll refresh atleast as often as user-specified refresh rate.
are you sure you can remove an event from a autocommand like that? I don't think that's a thing. if you want to clear you'd have to clear all of them. augroup lualine_stl_refresh
autocmd!
augroup END Also BufEnter and BufWritePost doesn't get triggered very often. And are quite handy for statusline. I feel like getting triggered by events is better than a refreshrate.
That rate does look suspiciously high. Can you tell me how did you record it? Also, where is this get_hl_diff ? I'm getting 0 hits with grep.
The internal diff caches it's result and doesn't actually hit filesystem as too often even if refresh rate is high. |
I think I've observed a concrete bug that falls under this. I use a very minimal lualine setup where I only display the filename, branch, macro status and attached lsps. So there're only a few events where it refreshes. Crucially, I don't display the mode. Currently, I can fix it either by 1) adding "mode" to lualine which I suspect forces it to refresh the string it displays or 2) just not using |
I see the refresh settings are documented here -
It mentions it is not guaranteed but does it not work at all in terms of not applying refreshes?
I want to control the refresh behavior myself so ideally I can disable it - would appreciate any feedback
But the setting seems to have no effect
The text was updated successfully, but these errors were encountered: