Skip to content

Commit

Permalink
statusline: Provide overwrite mode indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar committed Jan 20, 2025
1 parent 9f1ac78 commit 40a7486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions internal/display/statusline.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ var statusInfo = map[string]func(*buffer.Buffer) string{
}
return ""
},
"overwrite": func(b *buffer.Buffer) string {
if b.OverwriteModeActive {
return "[>]"
}
return ""
},
"lines": func(b *buffer.Buffer) string {
return strconv.Itoa(b.LinesNum())
},
Expand Down
2 changes: 1 addition & 1 deletion runtime/help/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ Here are the available options:
* `statusformatl`: format string definition for the left-justified part of the
statusline. Special directives should be placed inside `$()`. Special
directives include: `filename`, `modified`, `line`, `col`, `lines`,
`percentage`, `opt`, `bind`.
`percentage`, `opt`, `overwrite`, `bind`.
The `opt` and `bind` directives take either an option or an action afterward
and fill in the value of the option or the key bound to the action.

Expand Down

0 comments on commit 40a7486

Please sign in to comment.