gitui-org / gitui-org/gitui

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

Offen
#1,923 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature-request
Vorherrschende Sprache
Rust
Sterne
22.5k
Forks
774
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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:

 line 1

+line 1.5
+ 
 line 2

This is currently shown as:

 line 1
 ¶
+line 1.5
+¶
 line 2

Instead, I'd prefer if this was shown like this:

 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):

 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne am Einstiegspunkt der Zeilenumbruchvisualisierung der Diff-Ansicht und verfolge, wie umgebende hinzugefügte oder entfernte Zeilen klassifiziert werden. Verwende die Beispiele in diesem Issue, um zu überprüfen, dass Marker innerhalb neu hinzugefügter oder entfernter Blöcke unterdrückt werden, während sie auf informativen Begrenzungszeilen erhalten bleiben, einschließlich der Fälle mit der ersten oder letzten Zeile.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, rust
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.