summaryrefslogtreecommitdiffstats
path: root/pkg/theme
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-06-11 08:08:55 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-07-31 08:41:41 +0200
commit66de981e9108c83ddb1d778eb92e948050c85311 (patch)
treefcc5c35ee5909cd71157c331ef10beb200fe05ee /pkg/theme
parent375451785c2f72da368e0cafaff9dc2e9f40a5b4 (diff)
Add a "Mark commit as base commit for rebase" command
This allows to do the equivalent of "git rebase --onto <target> <base>", by first marking the <base> commit with the new command, and then selecting the target branch and invoking the usual rebase command there.
Diffstat (limited to 'pkg/theme')
-rw-r--r--pkg/theme/theme.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/theme/theme.go b/pkg/theme/theme.go
index 0a1624029..20832f6d3 100644
--- a/pkg/theme/theme.go
+++ b/pkg/theme/theme.go
@@ -36,6 +36,9 @@ var (
// CherryPickedCommitColor is the text style when cherry picking a commit
CherryPickedCommitTextStyle = style.New()
+ // MarkedBaseCommitTextStyle is the text style of the marked rebase base commit
+ MarkedBaseCommitTextStyle = style.New()
+
OptionsFgColor = style.New()
DiffTerminalColor = style.FgMagenta
@@ -55,6 +58,10 @@ func UpdateTheme(themeConfig config.ThemeConfig) {
cherryPickedCommitFgTextStyle := GetTextStyle(themeConfig.CherryPickedCommitFgColor, false)
CherryPickedCommitTextStyle = cherryPickedCommitBgTextStyle.MergeStyle(cherryPickedCommitFgTextStyle)
+ markedBaseCommitBgTextStyle := GetTextStyle(themeConfig.MarkedBaseCommitBgColor, true)
+ markedBaseCommitFgTextStyle := GetTextStyle(themeConfig.MarkedBaseCommitFgColor, false)
+ MarkedBaseCommitTextStyle = markedBaseCommitBgTextStyle.MergeStyle(markedBaseCommitFgTextStyle)
+
unstagedChangesTextStyle := GetTextStyle(themeConfig.UnstagedChangesColor, false)
UnstagedChangesColor = unstagedChangesTextStyle