gitui-org / gitui-org/gitui

Only show line-break visualization if the surrounding lines are not also newly added/removed

Aperta
#1,923 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

**Is your feature request related to a problem? Please describe.**
With v0.24, a new feature was added where empty lines are always rendered as `¶`. When adding a new file or a big chunk of code, this doesn't add much value and is very distracting.

**Describe the solution you'd like**
When viewing a diff, only show the line-break visualization on lines that aren't in the middle of a diff chunk but instead only on lines where it wouldn't otherwise be clear that a newline was added/removed.

For example:
```diff
line 1

+line 1.5
+
line 2
```

This is currently shown as:
```diff
line 1

+line 1.5

line 2
```

Instead, I'd prefer if this was shown like this:
```diff
line 1

+line 1.5

line 2
```

The `+` characters shown here are only for visualization purposes, because `diff` code blocks don't show color highlighting otherwise.

A larger example (note no `¶` between `line d` and `line e`):
```diff
line a1
line a2

line b

-line c1
-line c2
-
-line d

line e

+line f
```

This would mean that newly added or removed files would not contain any `¶` markers (unless on the very first or last line), which makes reading them a lot easir.

**Describe alternatives you've considered**
PR #1904 allows disabling line-break visualizations altogether which restores the behavior from v0.23.

Alternatively, a single space with a red or green background could be shown on lines where whitespace or an empty line is added or remove.

**Additional context**
This is related to #1894 and PR #1904 which requests turning off the newline visualization alltogether.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dal punto di ingresso della visualizzazione delle interruzioni di riga della vista diff e segui come vengono classificate le righe aggiunte o rimosse circostanti. Usa gli esempi di questa issue per verificare che i marker vengano soppressi all’interno dei blocchi appena aggiunti o rimossi, mentre rimangano sulle righe di confine informative, inclusi i casi della prima o dell’ultima riga.

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

Valutazione

Stack tecnologico
git, rust
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 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.