extrawurst / gitui

Blazing 💥 fast terminal-ui for git written in rust 🦀
MIT License
18.62k stars 573 forks source link

When the terminal is insufficient to display all the commands, the cmdbar_bg configuration color does not fully take effect. #2347

Open wugeer opened 2 months ago

wugeer commented 2 months ago

Describe the bug In my terminal, Kitty, I've customized the font size. In the GitUI window, when the commands do not fully display on one line, and I press . to show more commands, the background color of these additional commands does not match the cmdbar_bg color configured in ~/.config/gitui/theme.ron. 录屏 2024-08-30 11-59-18.webm

To Reproduce Steps to reproduce the behavior:

  1. adjust the terminal font size to ensure that the command cannot be displayed in one line
  2. vim ~/.config/gitui/theme.ron
    (
    cmdbar_bg: Some("#FFFFFF"),
    )
  3. execute gitui command then express . to show more command 4 . See the difference two command line

Expected behavior The background color of the two lines of commands is the color configured by cmdbar_bg in ~/.config/gitui/theme.ron.

Screenshots image

Context (please complete the following information):

extrawurst commented 2 months ago

interesting. good catch!

wugeer commented 2 months ago

@extrawurst hello, maybe I have discovered why this problem occurs. I would like to ask what is the meaning of the fields cmdbar_extra_lines_bg and cmdbar_bg under struct Theme? From my personal perspective, cmdbar_extra_lines_bg actually does not need to exist, the background of cmdbar should remain consistent. I will submit a PR to fix this issue later. :)