User guide / Git

Status line and gutter

Development reference · View source

Status line. main ↑1 +2 ~3 -1 ?4 !1 reads as: branch main, one commit ahead of upstream, two added, three modified, one deleted, four untracked, and one conflicted file. Each file is counted once, under the most consequential thing that happened to it.

Gutter. Tracked files get a change mark between the line number and its separator:

MarkMeaning
+Added line
~Modified line
-Lines were removed here (on the surviving row that closed the gap)
  • Marks compare against the index, not HEAD, so staging a change removes its marks.
  • A mark appears only on a logical line’s first screen row; soft-wrap continuations use the cell for their ↪ arrow.
  • Fold triangles share the cell. Only when a folded line is itself changed does the gutter add a second cell so both ▸ and the mark show.
  • Files with no unconflicted index entry — untracked, mid-merge, or binary — show no change column, rather than one claiming every line is new.

How marks stay current. Git is asked for a file’s staged text once, when it opens and after relevant Git changes while it is visible. Everything else is diffed in memory, so marks follow typing without a process per keystroke.

  • Large files are compared on a background worker: a changed gutter clears briefly, then shows marks for the newest completed revision.
  • Hidden buffers reload their staged text only when a pane shows their gutter.