Skip to content

Commit 25d89f7

Browse files
authored
fix: only render if hideClean is false and there are stashes (#93)
* fix: only render if hideClean is false and there are stashes * fix: test
1 parent 395d66d commit 25d89f7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tmux/formater.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ func (f *Formater) flags() string {
267267
flags = append(flags, fmt.Sprintf("%s%s", f.Styles.Clean, f.Symbols.Clean))
268268
}
269269

270-
return f.Styles.Clear + strings.Join(flags, " ")
270+
if len(flags) != 0 {
271+
return f.Styles.Clear + strings.Join(flags, " ")
272+
}
271273
}
272274

273275
if f.st.NumStaged != 0 {

tmux/formater_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ func TestFormat(t *testing.T) {
554554
options: options{
555555
HideClean: true,
556556
},
557-
want: "StyleClear",
557+
want: "",
558558
},
559559
{
560560
name: "hide clean option false",

0 commit comments

Comments
 (0)