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

[input] screen flickers in edit-cell #2274

Closed
midichef opened this issue Jan 28, 2024 · 2 comments · Fixed by #2369
Closed

[input] screen flickers in edit-cell #2274

midichef opened this issue Jan 28, 2024 · 2 comments · Fixed by #2369
Labels

Comments

@midichef
Copy link
Contributor

Small description
If I do edit-cell with a guide on screen in the sidebar, and then hit Tab, the cursor moves to the correct cell. But the cursor and screen flicker like they are being frequently redrawn. The flicker is mainly in the sidebar and the current cell.

Actual result with screenshot
I can upload a terminal recording, if this isn't easy to reproduce on different machines.

vd -N sample_data/sample.tsv, then edit-cell and hit Tab.

Additional context
The behavior is different in gnome-terminal vs alacritty. For gnome-terminal, the flicker shows up after tabbing to a different cell.
For alacritty, I don't have to hit Tab, the flicker shows up as soon as I run edit-cell.

For both gnome-terminal and alacritty, bisect shows the flicker started with b859610.

saul.pw/VisiData v3.1dev
Python 3.10.12
Ubuntu 22.04.3
gnome-terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD
alacritty 0.13.1

@midichef midichef added the bug label Jan 28, 2024
@midichef
Copy link
Contributor Author

If this helps, I extracted a list of the important drawing calls to try to trace what was going on in editText(). But I ran out of steam.

editText():
  v = vd.editline(vd.activeSheet._scr, y, x, w, display=display, **kwargs)
  editline():
    disp_help = HelpCycler(scr, '')
    while True:
      disp_help.draw()
        vd.drawInputHelp(scr, '')
          curhelp = vd.getHelpPane('input', module='visidata')
          sheet.drawSidebarText(scr, curhelp, title='Input Keystrokes Help')
            sidebarscr = vd.subwindow(scr, x, y, w, h)   #(call this the A subwindow)
            text.draw(sidebarscr)  #(is actually curhelp.draw(sidebarscr) which is HelpPane.draw())
              #has lots of calls to:
              HelpPane.draw(vs.subwindow(scr))
                  #which makes a new B subwindow in the A subwindow:
                  vd.subwindow(scr of the new subwindow)
                  # and calls erase(), refresh() on its parent the A subwindow

@midichef
Copy link
Contributor Author

Another related effect: some input prompts, like go-col-regex or go-col-number leads visidata's CPU usage to go up from 0% to a nonstop 20-30%. Surprisingly, search-col does not.

To reproduce: vd -N sample_data/sample.tsv, then go-col-regex and don't enter any characters.

This behavior started with the same commit, b859610.

That commit is dated Jan 14 so it's not the cause of #2243, which was reported Jan 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant