wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Configuring font_size causes new windows to spawn with large number of rows and columns.

Open ocheret opened this issue 1 year ago • 1 comments

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

macOS

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

No response

WezTerm version

20240203-110809-5046fc22

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

By default, when I spawn new wezterm windows they open with 24 rows and 80 columns. In my ~/.wezterm.lua if I add the line config.font_size = 16, then new windows spawn with 48 rows and 153 columns. I don't understand why asking for a larger font causes the number of rows and columns to increase? Seems like a bug.

To Reproduce

  • Remove any font selection from the wezterm configuration.
  • Run wezterm.
  • Use stty -a to observe window is 24x80.
  • Configure font_size to 16.
  • Rerun wezterm.
  • Use stty -a to observe window is 48x153 (or some other number for different sizes/fonts). I'm using 'JetBrains Mono'

Configuration

-- Pull in the wezterm API
local wezterm = require("wezterm")

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
        config = wezterm.config_builder()
end

-- For example, changing the color scheme:
config.color_scheme = "Catppuccin Macchiato"
config.font = wezterm.font("JetBrains Mono")
config.font_size = 16 -- This is the line that causes the issue

Expected Behavior

  • I would have expected that changing the font size would merely create a 24x80 character window at a different size and not increase the number of rows and columns to create an unwieldy window.
  • I am forced to work around the issue by removing the font-size configuration and to grow each window manually after creating it with CMD-=.

Logs

Debug Overlay wezterm version: 20240203-110809-5046fc22 aarch64-apple-darwin Window Environment: macOS 14.6.1 (23G93) Lua Version: Lua 5.4 OpenGL: Apple M2 Pro 4.1 Metal - 88.1

Anything else?

Love the program otherwise. Just starting out. Excuse me if this is easily addressed by something I missed.

ocheret avatar Aug 27 '24 16:08 ocheret

Hi ocheret,

Check out bug #1039

loops avatar Aug 28 '24 21:08 loops