Skip to content

Commit

Permalink
Always append the Clear attribute to gitmux status string
Browse files Browse the repository at this point in the history
Fix #107
  • Loading branch information
arl committed Jan 2, 2024
1 parent 17c9f2d commit 4560104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testdata/default.output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ with some different content

-- empty_file --
-- output.golden --
#[fg=default]#[fg=default]#[fg=white,bold]⎇ #[fg=default]#[fg=white,bold]main#[fg=default] - #[fg=default]#[fg=green,bold]● 1 #[fg=red,bold]✚ 1 #[fg=cyan,bold]⚑ 1 #[fg=magenta,bold]… 2#[fg=default,bg=default]
#[none]#[none]#[fg=white,bold]⎇ #[none]#[fg=white,bold]main#[none] - #[none]#[fg=green,bold]● 1 #[fg=red,bold]✚ 1 #[fg=cyan,bold]⚑ 1 #[fg=magenta,bold]… 2#[fg=default,bg=default]#[none]
2 changes: 2 additions & 0 deletions tmux/formater.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func truncate(s, ellipsis string, max int, dir direction) string {

// Format writes st as json into w.
func (f *Formater) Format(w io.Writer, st *gitstatus.Status) error {
defer fmt.Fprintf(w, "%s", f.Styles.Clear)

f.st = st

// Overall working tree state
Expand Down

0 comments on commit 4560104

Please sign in to comment.