wezterm
wezterm copied to clipboard
WSL: Pasting creates ghost empty entries in Windows clipboard history
Summary
When pasting text inside WezTerm running WSL, ghost empty entries appear in the Windows clipboard history (Win+V). These entries appear above and below the actual clipboard content.
Environment
- WezTerm: latest nightly
- OS: Windows 11 (WSL2, Ubuntu)
- WSLg: enabled
Steps to Reproduce
- Open WezTerm with WSL
- Copy some text from any Windows application (e.g., browser)
- Paste into WezTerm (Ctrl+Shift+V)
- Open Windows clipboard history (Win+V)
- Observe empty entries appearing before and after the actual copied text
Expected Behavior
Pasting into WezTerm should not modify or add entries to the Windows clipboard history.
Actual Behavior
Each paste operation creates 1-2 empty/whitespace entries in the clipboard history surrounding the original content.
Notes
- This does not happen when pasting in other terminals (e.g., Windows Terminal)
- This does not happen when pasting between pure Windows applications
- This only happens when pasting inside WezTerm with WSL
- Disabling
enable_osc52_clipboarddoes not fix the issue - The issue persists regardless of the shell (bash, zsh) or application running inside the terminal
WezTerm Config
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.color_scheme = 'Ubuntu'
config.window_decorations = 'RESIZE'
config.font = wezterm.font('Fira Code', { weight = 'Regular' })
config.font_size = 11
config.default_prog = { 'wsl.exe', '~' }
config.wsl_domains = {
{
name = 'WSL:Ubuntu',
distribution = 'Ubuntu',
default_cwd = '~',
},
}
return config