mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
fix: clear autocmd when loading other colorscheme
Problem: When switching the colorscheme from rose-pine to something else, the new colorshceme can be a bit off due to rose-pine's autocmd. Solution: Clear the autocmd. Ideally, it should also reset winhighlight for all windows it touched, but that requires a bit more work.
This commit is contained in:
parent
7777aa953c
commit
7cac7c82bd
1 changed files with 7 additions and 3 deletions
|
|
@ -882,9 +882,13 @@ local function set_highlights()
|
|||
|
||||
-- Support StatusLineTerm & StatusLineTermNC from vim
|
||||
vim.cmd([[
|
||||
autocmd TermOpen * if &buftype=='terminal'
|
||||
\|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
|
||||
\|else|setlocal winhighlight=|endif
|
||||
augroup rose-pine
|
||||
autocmd!
|
||||
autocmd TermOpen * if &buftype=='terminal'
|
||||
\|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
|
||||
\|else|setlocal winhighlight=|endif
|
||||
autocmd ColorSchemePre * autocmd! rose-pine
|
||||
augroup END
|
||||
]])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue