[help- sidebar-] prevent sidebar flicker #2630 #2630
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm seeing flickering in the help panes when any input is being requested, like from
exec-longname
oreditCell()
. 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 ofrefresh()
to fix the flicker by refreshing the screen less often. The change todrawSidebarText()
fixes the cursor flicker. The change toHelpPane.draw()
fixes the title flicker.To reproduce flicker of the cursor:
vd sample_data/sample.tsv
,Space
^G
(to bring up theInput Field Help
pane)To reproduce flicker of the help pane title:
vd sample_data/sample.tsv
,e
^G
(to bring up theInput 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