Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top of visual bell starts too far down (in the middle of the first line) #2364

Closed
scy opened this issue Aug 6, 2022 · 3 comments
Closed
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@scy
Copy link

scy commented Aug 6, 2022

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

Windows

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

No response

WezTerm version

wezterm 20220805-075344-ef532fc7

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

WezTerm’s visual bell, at least on my system and with my configuration, starts too far down. It’s upper edge is in the middle of the first line. This occurs independent of the size of the window.

See here for a 5 second GIF demonstrating the issue (not embedded directly because it’s flashing).

The lower edge seems to be centered in the middle of the line after the last line. What I mean by that is that depending on the height of the window, there’s 0 to x-1 pixel rows of “dead space” below the last line, where x is the height of a line. (If there were x pixels or more available below the last line, there’d be space for another line.) The middle of the lower edge of the visual bell seems to be at around x/2 pixels below the lower edge of the last line. In other words, depending on the height of the window and how much space there is below the last line, the lower edge of the visual bell will extend somewhere between the lower edge of the window and halfway between the last line and the lower edge of the window.

I’m not bugged by the lower edge as much as I am by the upper edge, but I thought I’d mention it nevertheless.

To Reproduce

Enable the visual bell (see my attached config) and cause some bells, I guess?

Configuration

local wezterm = require 'wezterm'

return {
        -- Profiles
        default_prog = { 'wsl', '-d', 'Ubuntu', '--cd', '~' },  -- TODO put behind an OS check

        -- Window Size
        initial_cols = 180,
        initial_rows = 45,

        -- Font
        font = wezterm.font 'Iosevka Term',
        font_size = 10.5,
        harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' },  -- disable ligatures

        -- Colors & Translucency
        color_scheme = 'Sihaya',
        -- the following currently works on my Windows machine, I'll add others when required
        color_scheme_dirs = { 'C:\\Users\\scy\\dotfiles\\.config\\wezterm\\colors' },
        bold_brightens_ansi_colors = false,  -- don't keep me from having bold text
        window_background_opacity = 0.95,

        -- Tab Bar
        hide_tab_bar_if_only_one_tab = true,
        use_fancy_tab_bar = true,

        -- Visual Bell Only
        audible_bell = 'Disabled',
        visual_bell = {
                fade_in_duration_ms = 20,
                fade_out_duration_ms = 200,
                fade_in_function = 'Linear',
                fade_out_function = 'EaseOut',
        },

        -- Features
        enable_kitty_keyboard = true,  -- modernize keyboard input
}

Expected Behavior

I’d say, have the visual bell cover the whole window (or pane), regardless of where the edges of the actual text cells are. In other words, when the bell flashes, the whole background should flash, edge to edge, with no visible borders around the text.

If that’s not possible or you consider it ugly, let it flash from the top left of the top left cell to the bottom right of the bottom right cell.

Logs

Debug Overlay
wezterm version: 20220805-075344-ef532fc7
OpenGL version: Intel(R) HD Graphics 630 4.5.0 - Build 27.20.100.8682
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
22:06:41.596 WARN wezterm_term::terminalstate > unhandled DecPrivateMode ResetDecPrivateMode(Unspecified(1005))

(I don’t think the warning is related.)

Anything else?

Thanks for your work, and sorry for submitting two bugs in a row ;)

@scy scy added the bug Something isn't working label Aug 6, 2022
wez added a commit that referenced this issue Aug 6, 2022
@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Aug 6, 2022
@wez
Copy link
Owner

wez commented Aug 6, 2022

This should be fixed now in main.

It typically takes about an hour before fixes are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.

Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.

If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg file on macOS, a .zip file on Windows and an .AppImage file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.

If you are eager and can build from source then you may be able to try this out more quickly.

@scy
Copy link
Author

scy commented Aug 7, 2022

It’s indeed fixed in the nightly build, now spanning the whole window. Beautiful! Thank you very much for the quick fix.

@scy scy closed this as completed Aug 7, 2022
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

2 participants