wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.78k stars 751 forks source link

Black borders inside terminal window after setting padding to zero #3037

Closed vykio closed 1 year ago

vykio commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

qTile

WezTerm version

20221119-145034-49b9839f

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 have set window padding to 0 on left, right, bottom and top in the configuration. When launching vim without resizing the window everything is fine.

After resizing the window, some borders are showing up and I can't figure out how to delete it.

To Reproduce

Launching Wezterm (also works on Nightly) and opening Vim (with a colourscheme so that the borders are showing up).

Resize the terminal window and voila, a border at the bottom and one on the left are showing up.

Configuration

local wezterm = require 'wezterm'

wezterm.on("update-right-status", function(window)
    window:set_right_status(wezterm.format({
        { Attribute = { Intensity = "Bold" } },
        { Text = wezterm.strftime(" %A, %d %B %Y %H:%M ") },
    }))
end)

return {
  hide_tab_bar_if_only_one_tab = true,
  tab_bar_at_bottom = true,
  font_size = 10.0,
  initial_cols = 110,
  initial_rows = 25,
  enable_scroll_bar = false,
  window_close_confirmation = "NeverPrompt",
  audible_bell = "Disabled",
  inactive_pane_hsb = {
    saturation = 1.0,
    brightness = 0.85,
  },
  use_fancy_tab_bar = false,
  front_end = "WebGpu",
  window_padding = {
    left = 0,
    right = 0,
    top = 0,
    bottom = 0,
  },
  keys = {
    {
      key = 'F11',
      mods = '',
      action = wezterm.action.ToggleFullScreen,
    },
    {
      key = 'w',
      mods = 'CTRL|SHIFT',
      action = wezterm.action.CloseCurrentPane { confirm = true },
    },

    -- This will create a new split and run your default program inside it
    {
      key = 'v',
      mods = 'CTRL|SHIFT|ALT',
      action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
    },
    {
      key = 'h',
      mods = 'CTRL|SHIFT|ALT',
      action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
    },
  },
}

Expected Behavior

Borders are not showing up because window_padding are set to zero

Logs

gui log

13:56:08.653  WARN   mux::localpane > unknown DeviceControlMode::Enter EnterDeviceControlMode(params: [], intermediates: [], byte: 'z' 0x7a, ignored_extra_intermediates=false)
13:56:08.653  WARN   mux::localpane > unhandled DeviceControlMode::Data 7a z
13:56:08.653  WARN   wezterm_term::terminalstate::performer > unknown unspecified CSI: "0%m"

Anything else?

image

wez commented 1 year ago

Terminals use a grid of fixed size cells for their display. When you resize a window to have a width/height that isn't an exactly multiple of the cell dimensions you will have some pixels left over. That is what you are seeing.

The window_padding option only controls whether additional padding is added.

The appearance is jarring in the screenshot you shared because vim is configured to use a different background color from the terminal, and the contrast between those backgrounds is relatively high.

github-actions[bot] commented 1 year ago

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.