summaryrefslogtreecommitdiff
path: root/scan.go
diff options
context:
space:
mode:
Diffstat (limited to 'scan.go')
-rw-r--r--scan.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/scan.go b/scan.go
index 27b2e8c..fb1b1e3 100644
--- a/scan.go
+++ b/scan.go
@@ -72,8 +72,15 @@ func (r *RepoRow) Update() int {
// disable the commit button if the repo is not on the user branch
if pb.GetCurrentBranchName() == pb.GetUserBranchName() {
- r.commitB.Enable()
+ if r.pb.GetState() == "dirty" {
+ r.diff.Enable()
+ r.commitB.Enable()
+ } else {
+ r.diff.Disable()
+ r.commitB.Disable()
+ }
} else {
+ r.diff.Disable()
r.commitB.Disable()
}