You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leaving and coming back to the diffview tab, or simply just revisiting one of the diffs (buffers), resets/clobbers all of my winhl customizations. Is there any reason why this plugin is dynamically changing/resetting options on TabLeave, or, when revisiting a previously-viewed buffer (especially given the fact that the window ids remain the same)? This is silly and unexpected behavior imo. How else can I customize winhl? Right now I'm using a DiffviewDiffBufRead autocmd (because setting win opts or config via this plugin seems to be only supported for "panels"?).
I guess in the meantime I need to choose a different autocmd, or force my highlights with a window namespace.
EDIT: it seems that other window options, like spell, are not reset/clobbered. So I assume the winhl issue is because either:
A.winhl is set by this plugin, while spell isn't B.winhl isn't getting set/reset properly (although it probably shouldn't be reset in the first place, unless there is a good reason to do so)
Expected behavior
Don't reset options post-load if it is not necessary.
Don't clobber winhl or any other list-like options that this plugin sets (you need to share, or allow me a way to accomplish this via other means, lol).
Actual behavior
See Description
Steps to reproduce
nvim--cleanDiffviewOpen {somerev}
-- Set winhl without clobbering other mappings.-- This could even be improved further (but I won't do that here), as hl groups are in fact case-insensitive.localw=vim.opt_local.winhlw.DiffChange='MyDiffChangeAsDiffDelete'vim.opt_local.winhl=w-- Now just trigger issue as explained above
Health check
Likely irrelevant, but here it is:
diffview:require("diffview.health").check()
Checking plugin dependencies ~
- OK nvim-web-devicons installed.
Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- OK Git found.
- OK Git isup-to-date. (2.45.1)
- WARNING Configured `hg_cmd` is not executable: 'hg'
Description
Leaving and coming back to the diffview tab, or simply just revisiting one of the diffs (buffers), resets/clobbers all of my
winhl
customizations. Is there any reason why this plugin is dynamically changing/resetting options onTabLeave
, or, when revisiting a previously-viewed buffer (especially given the fact that the window ids remain the same)? This is silly and unexpected behavior imo. How else can I customizewinhl
? Right now I'm using aDiffviewDiffBufRead
autocmd (because setting win opts or config via this plugin seems to be only supported for "panels"?).I guess in the meantime I need to choose a different autocmd, or force my highlights with a window namespace.
Expected behavior
winhl
or any other list-like options that this plugin sets (you need to share, or allow me a way to accomplish this via other means, lol).Actual behavior
See Description
Steps to reproduce
Health check
Likely irrelevant, but here it is:
Log info
n/a
Neovim version
Operating system and version
macOS 14.2.1
Minimal config
Maybe related to: #457, #442
The text was updated successfully, but these errors were encountered: