Skip to content

Theme picker leaves visual artifact on nvdash when closed (WSL2 + WezTerm) #537

@marco-siboldi

Description

@marco-siboldi

Description

When opening the theme picker (<leader>th) on nvdash and closing it (with q, ESC, or selecting a theme), a rectangular visual artifact remains on the screen where the picker window was displayed.

Environment

  • OS: Windows 11 (WSL2 - Ubuntu 24.04)
  • Terminal: WezTerm 20250203-143026-c86b5419 (or latest version)
  • NvChad version: Latest (starter template, clean install as of 2026-02-04)
  • Neovim version: 0.10.x (installed via Homebrew)
  • Theme: gruvchad

Steps to Reproduce

  1. Open Neovim (nvdash loads automatically with load_on_startup = true)
  2. Press <Space>th to open theme picker
  3. Close the picker by:
    • Pressing q, OR
    • Pressing ESC (once or twice), OR
    • Selecting any theme
  4. Observe the rectangular artifact remaining on nvdash

Expected Behavior

The theme picker window should close cleanly without leaving any visual artifacts on the screen.

Actual Behavior

A gray/dark rectangular box remains visible on the nvdash screen at the position where the theme picker was displayed.

Screenshots

![Theme Picker Open]

Image

Theme picker open and working normally

![Visual Artifact After Closing](

Image

)
Rectangular artifact visible after closing the picker

Workarounds Attempted

Workarounds Attempted

  1. :redraw! or Ctrl+L: Does NOT clear the artifact
  2. <Space>cl custom keybind with vim.cmd("mode") + vim.cmd("redraw!"): Does NOT work
  3. ⚠️ Autocmd approach (does NOT solve the issue):
    vim.api.nvim_create_autocmd("WinClosed", {
      pattern = "*",
      callback = function()
        vim.defer_fn(function()
          vim.cmd("redraw!")
        end, 50)
      end,
    })
    
    
  4. ⚠️ BufLeave autocmd (does NOT solve the issue):
    vim.api.nvim_create_autocmd("BufLeave", {
      pattern = "*",
      callback = function()
        if vim.bo.buftype == "nofile" then
          vim.defer_fn(function()
            vim.cmd("mode")
          end, 50)
        end
      end,
    })
    
    
  5. Only workaround: Opening a file or switching tabs clears the artifact (closing nvdash)

Configuration

chadrc.lua:

---@type ChadrcConfig
local M = {}

M.base46 = {
  theme = "gruvchad",
}

M.nvdash = { load_on_startup = true }

M.ui = {
  tabufline = {
    lazyload = false,
  },
  transparency = false,
}

vim.opt.clipboard = "unnamedplus"

return M

WezTerm config (.wezterm.lua):

 config.front_end = 'WebGpu'
 config.max_fps = 60
 config.window_background_opacity = 0.98

This issue appears to be specific to the WSL2 + WezTerm environment
The artifact is purely visual and doesn't affect functionality
The artifact persists even after multiple redraw attempts
Only way to clear it is to leave nvdash (open a file, switch tabs, etc.)

The floating window created by the theme picker may not be properly cleaning up its buffer or triggering nvdash to re-render when closed in WSL2 terminal environments. Standard redraw commands don't affect it, suggesting the underlying buffer state is not being updated.

Request
Is there a proper way to force nvdash to fully re-render its buffer after closing floating windows, or should the theme picker plugin handle cleanup differently for WSL environments?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions