diff --git a/pkg/gui/controllers/list_controller.go b/pkg/gui/controllers/list_controller.go index 36ac1ba91..2fbadd2fe 100644 --- a/pkg/gui/controllers/list_controller.go +++ b/pkg/gui/controllers/list_controller.go @@ -109,10 +109,11 @@ func (self *ListController) handleLineChangeAux(f func(int), change int) error { // we're not constantly re-rendering the main view. cursorMoved := before != after if cursorMoved { - if change == -1 { + switch change { + case -1: checkScrollUp(self.context.GetViewTrait(), self.c.UserConfig(), self.context.ModelIndexToViewIndex(before), self.context.ModelIndexToViewIndex(after)) - } else if change == 1 { + case 1: checkScrollDown(self.context.GetViewTrait(), self.c.UserConfig(), self.context.ModelIndexToViewIndex(before), self.context.ModelIndexToViewIndex(after)) } diff --git a/pkg/gui/presentation/files.go b/pkg/gui/presentation/files.go index 64296aa8c..4222fb68d 100644 --- a/pkg/gui/presentation/files.go +++ b/pkg/gui/presentation/files.go @@ -185,9 +185,10 @@ func getFileLine( func formatFileStatus(file *models.File, restColor style.TextStyle) string { firstChar := file.ShortStatus[0:1] firstCharCl := style.FgGreen - if firstChar == "?" { + switch firstChar { + case "?": firstCharCl = theme.UnstagedChangesColor - } else if firstChar == " " { + case " ": firstCharCl = restColor }