Closed milanglacier closed 2 years ago
Perhaps you want to enable https://wezfurlong.org/wezterm/config/lua/config/force_reverse_video_cursor.html ?
This works amazingly! Thanks!
For people like me who prefer to swtich the colorscheme dynamically (based on OS theme), I find that every time if a colorsheme resets, then force_reverse_video_cursor
automatically sets to false
, then manually set it to true in everytime override works:
local function switch_color_scheme_with_OS()
wezterm.on('window-config-reloaded', function(window, _)
local overrides = window:get_config_overrides() or {}
local appearance = window:get_appearance()
local scheme = scheme_for_appearance(appearance, _)
if overrides.color_scheme ~= scheme then
overrides.color_scheme = scheme
overrides.force_reverse_video_cursor = true
window:set_config_overrides(overrides)
end
end)
end
For people like me who prefer to swtich the colorscheme dynamically (based on OS theme), I find that every time if a colorsheme resets, then
force_reverse_video_cursor
automatically sets tofalse
, then manually set it to true in everytime override works:
If you use the new color_scheme = scheme_for_appearance(wezterm.gui.get_appearance())
instead of the old window-config-reloaded
hack, then your workaround is not necessary and force_reverse_video_cursor
persists.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What Operating System(s) are you seeing this problem on?
macOS
WezTerm version
wezterm 20220624-141144-bd1b7c5d
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I tried the nightly build (manually build from source) and it has the same problem.
Some neovim/vim colorschemes doesn't specifically set the cursor fg and bg as a fixed color value, sometimes they uses:
highlight Cursor cterm=reverse
to reverse the fg and bg of the cell under the cursor. In alacritty(if don't set any curor color inalacritty.yml
) or iterm2 (setPreferences-Profiles-Colors-Smart box cursor color
to true),cterm=reverse
is respected, and in wez,cterm=reverse
is not respected.To Reproduce
Configuration
wezterm config:
Expected Behavior
Respect
highlight Cursor cterm=reverse
by vim/neovimLogs
No response
Anything else?
screenshot:
alacritty
wezterm