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

[help- sidebar-] prevent sidebar flicker #2630 #2630

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Dec 7, 2024

I'm seeing flickering in the help panes when any input is being requested, like from exec-longname or editCell(). There are two kinds of flicker. Flicker in the cursor next to the sidebar title, and flicker in the title of the 'Input Keystrokes Help' pane. The flicker is frequent, happening several times per second.

This PR uses noutrefresh() instead of refresh() to fix the flicker by refreshing the screen less often. The change to drawSidebarText() fixes the cursor flicker. The change to HelpPane.draw() fixes the title flicker.

To reproduce flicker of the cursor:
vd sample_data/sample.tsv, Space ^G (to bring up the Input Field Help pane)
To reproduce flicker of the help pane title:
vd sample_data/sample.tsv, e ^G (to bring up the Input Keystrokes Help pane).

The flicker happens about 90% of the time I run vd, not every single time.

Here are my system details:
saul.pw/VisiData v3.2dev, running via vd -N
Ubuntu 24.04.1
Python 3.12.3
GNOME Terminal 3.52.0 using VTE 0.76.0 +BIDI +GNUTLS +ICU +SYSTEMD

The flicker is sensitive to particular system configuration, as I'm not seeing it on a system with:
Ubuntu 22.04
Python 3.10.12
GNOME Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD

The change to drawSidebarText() fixes flicker of the cursor
next to the sidebar title. The change to HelpPane.draw() fixes
flicker in the title of the 'Input Keystrokes Help' pane.
Copy link
Owner

@saulpw saulpw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we can try it. I've had issues with screen artifacts from under-updating in the past, and decided that flicker was better. But I agree that a flickering block of color while giving input is annoying.

@anjakefala anjakefala merged commit ff489d3 into saulpw:develop Dec 9, 2024
14 checks passed
@midichef midichef deleted the sidebar_flicker branch December 19, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants