Skip to content

Drawing char in column 1 causes the entire terminal to stutter #1033

Description

@nik-rev

Hi, I am experiencing a single stutter when the following character is first rendered on the 1st cell 1st column (and variants):

2025-04-02_20-48-26.online-video-cutter.com.mp4

I'm not exactly sure why this could be, but I guess that because the first line is all ascii characters:

Status [1]  |  Log [2]  |  Files [3]  |  Stashing [4]  |  Stashes [5]                                             /home/e/r/helix/

There must be something about that is unique. It is not a regular ascii character.

In the video I am pressing the key 2 in order to trigger the menu to reload. The stutter happens every time I do this.

If I hold down 2 to cause the to render first and then be replaced by other variations of , there is only the initial stutter:

2025-04-02_21-05-40.online-video-cutter.com.mp4

I changed the source code of gitui to use basic ascii characters a..h for the spinner instead of

Indeed, this fixed the problem stutter:

2025-04-02_21-15-43.online-video-cutter.com.mp4

Now I tried to debug this

I learned that this is happening because of font_id. font_id of is 5. I set this to 0 and it works. Of course this is only a step in the right direction

(edit: I think this isn't because of font_id, changing font_id = 0 does "fix" this but like that's not the actual issue)

For reference, I added this line:

if matches!(
    item.content.as_str(),
    "⣷" | "⣯" | "⣟" | "⡿" | "⢿" | "⣻" | "⣽" | "⣾"
) {
    // reset from 5 to 0, maybe that's going to work?
    item.style.font_id = 0;
}

In sugarloaf/src/layout/content.rs.

My full config

My full config
confirm-before-quit = false
use-fork = false
navigation.use-current-path = true
padding-y = [10, 0]

bindings.keys = [
  { key = "n", with = "control", action = "SelectNextTab" },
  { key = "p", with = "control", action = "SelectPrevTab" },
  { key = "d", with = "alt", action = "ScrollHalfPageDown" },
  { key = "u", with = "alt", action = "ScrollHalfPageUp" },
  { key = "x", with = "control | shift", action = "CloseTab" },
  { key = "=", with = "control | shift", action = "IncreaseFontSize" },
  { key = "-", with = "control", action = "DecreaseFontSize" },
  { key = "f", with = "control | shift", action = "SearchForward" },
  { key = "b", with = "control | shift", action = "SearchBackward" },
  { key = "=", with = "control", action = "ResetFontSize" },
  { key = "F11", action = "ToggleFullScreen" },
  { key = "\\", with = "control", action = "ToggleVIMode" },
  ### to find out which bytes correspond to which control sequences, use `showkey -a`
  # delete word backward
  { key = "back", with = "control", bytes = [
    23,
  ] },
  # delete word forward
  { key = "back", with = "shift", bytes = [
    27,
    100,
  ] },
  # delete line until the end
  { key = "back", with = "control | shift", bytes = [
    11,
  ] },
  # delete line until beginning
  { key = "back", with = "shift | control", bytes = [
    21,
  ] },
]

[fonts]
size = 19
regular.family = "JetBrainsMono NF"
bold.family = "JetBrainsMono NF"
italic.family = "JetBrainsMono NF"
bold-italic.family = "JetBrainsMono NF"

### catppuccin theme

[colors]
# Normal
foreground = '#cdd6f4'
background = '#1e1e2e'
black = '#45475a'
blue = '#89b4fa'
cursor = '#f5e0dc'
vi-cursor = '#f5e0dc'
cyan = '#94e2d5'
green = '#a6e3a1'
magenta = '#f5c2e7'
red = '#f38ba8'
white = '#bac2de'
yellow = '#f9e2af'
# UI colors
tabs = '#b4Befe'
tabs-active = '#b4befe'
selection-foreground = '#1e1e2e'
selection-background = '#f5e0dc'
# Dim colors
dim-black = '#45475a'
dim-blue = '#89b4fa'
dim-cyan = '#94e2d5'
dim-foreground = '#cdd6f4'
dim-green = '#a6e3a1'
dim-magenta = '#f5c2e7'
dim-red = '#f38ba8'
dim-white = '#bac2de'
dim-yellow = '#f9e2af'
# Light colors
light-black = '#585b70'
light-blue = '#89b4fa'
light-cyan = '#94e2d5'
light-foreground = '#cdd6f4'
light-green = '#a6e3a1'
light-magenta = '#f5c2e7'
light-red = '#f38ba8'
light-white = '#a6adc8'
light-yellow = '#f9e2af'

This does not seem to be a gitui issue, as I have tested it with these terminal emulators and it is not an issue there:

  • kitty 0.37
  • alacritty 0.14

To test this with gitui do it on the Log (press / hold 2) in a sufficiently large repo (e.g. 5k+ commits)

I have tested this with different repositories including helix, gitui and rio repos

Versions:

  • gitui 0.27
  • rioterm 0.2.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions