gitui-org / gitui-org/gitui

`Ctrl+L` to Repaint Screen

Aperta
#2,703 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature-request
Lingua principale
Rust
Stelle
22.5k
Fork
773
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### The Problem
A TUI can get messed up for various reasons, and `gitui` is no exception.
A simple trigger that's reproducible with `gitui` is running it in the internal shell in Midnight Commander - a setup that would be very convenient, if it weren't so badly impeded by `gitui` (as of v0.27.0) losing its shape as soon as `mc`'s panels are toggled (`Ctrl+O`).

### Suggested Solution
Like most other TUI tools, `gitui` should offer a dedicated command, readily bound to a keyboard shortcut (preferably `Ctrl+L`), that **repaints the entire screen content** that's meant to be displayed.

### Additional Context
- Screenshot:Image
- Proper display can be restored to some extend by cycling through tabs - the more content, the better, because `gitui` redraws the changed areas of the terminal. E. g. the `Log` tab with many verbose messages often suffices to restore the left 60% or so. However, this workaround is both cumbersome and incomplete, disturbing fragments remain. At the end, exiting and restarting `gitui` is the only real remedy I know.
- Examples of TUI applications without this bug include `mc`'s own TUI (with panels on), as well as `less`, `mutt`, `vim`, `htop`, `aptitude` - you name it. When run in `mc`'s internal terminal and panels are toggled, they either don't get deranged, in the first place, or a quick `Ctrl+L` will completely resolve the mess.
- The same holds if you test `gitui` vs. other TUI applications outside `mc`, e. g. by forcing garbage onto them, as in `echo "garbage" > /dev/pts/8`. All of the above examples (and many more) are instantaneously set back in order by a simple `Ctrl+L`.
- Possibly related (even if remotely): #1077

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non viene indicato alcun file o test. Inizia individuando in gitui la gestione dell'input del terminale e i punti di ingresso per il ridisegno dello schermo, quindi segui il modo in cui le associazioni di tasti esistenti attivano gli aggiornamenti. Il lavoro è completato quando un'associazione Ctrl+L ridisegna l'intera schermata prevista e ripristina la visualizzazione dopo aver alternato i pannelli di Midnight Commander o aver iniettato spazzatura nel terminale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.