Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
492586e
Demonstrate that a config file without custom commands duplicates them
Makihataima-Ken Sep 28, 2026
0cb211d
Stop config files without custom commands from duplicating them
Makihataima-Ken Sep 28, 2026
a221a49
Fix a data race when coloring branch name suggestions
Makihataima-Ken Sep 28, 2026
7e1f449
Fix data races when logging commands and formatting patches on workers
Makihataima-Ken Sep 28, 2026
1ad461c
Don't read a view's colors when writing a broken escape sequence
Makihataima-Ken Sep 28, 2026
35d7082
Add tests for what the status line shows
Makihataima-Ken Sep 28, 2026
584fe5e
Demonstrate that a waiting status hides an earlier toast
Makihataima-Ken Sep 28, 2026
b50c3f3
Show toasts ahead of waiting statuses in the status line
Makihataima-Ken Sep 28, 2026
83e0925
Keep the searching frame color when a reloaded config changes the theme
Makihataima-Ken Sep 28, 2026
04bf3ce
Let earlier command log entries follow a theme switch
Makihataima-Ken Sep 28, 2026
4eb8db7
Reset the graph's color cache when author colors change
Makihataima-Ken Sep 29, 2026
5be2f7a
Extract a helper for files that are kept next to state.yml
Makihataima-Ken Sep 28, 2026
749e14a
Extract the migration of theme keys into gui.theme
Makihataima-Ken Sep 29, 2026
e42f1dc
fixup! Extract the migration of theme keys into gui.theme
Makihataima-Ken Sep 29, 2026
41cde19
Demonstrate that merge keys in color patterns lose the merged patterns
Makihataima-Ken Sep 29, 2026
bc9dda9
Expand merge keys in color patterns
Makihataima-Ken Sep 29, 2026
6bff631
Apply the selected theme file on top of the global config
Makihataima-Ken Sep 29, 2026
9f80153
fixup! Apply the selected theme file on top of the global config
Makihataima-Ken Sep 29, 2026
0a2e944
Let integration tests check toasts shown while lazygit starts up
Makihataima-Ken Sep 28, 2026
417c579
Tell the user when their selected theme can't be loaded
Makihataima-Ken Sep 28, 2026
471d876
Let AppConfig switch themes without reloading the other settings
Makihataima-Ken Sep 29, 2026
8b9f3f2
Extract re-applying the theme from the color scheme change handler
Makihataima-Ken Sep 29, 2026
f6504b9
Extract applying the theme's colors to the views
Makihataima-Ken Sep 29, 2026
7a35f49
Only set the views' colors again when the terminal's background changes
Makihataima-Ken Sep 29, 2026
7cc2a61
amend! Only set the views' colors again when the terminal's backgroun…
Makihataima-Ken Sep 29, 2026
ec5e19f
Add a menu for switching themes
Makihataima-Ken Sep 29, 2026
e7af337
fixup! Add a menu for switching themes
Makihataima-Ken Sep 29, 2026
4192e4c
fixup! Add a menu for switching themes
Makihataima-Ken Sep 29, 2026
86bed25
Document theme files and the theme menu
Makihataima-Ken Sep 29, 2026
dc06231
fixup! Apply the selected theme file on top of the global config
Makihataima-Ken Sep 29, 2026
b7285df
fixup! Document theme files and the theme menu
Makihataima-Ken Sep 29, 2026
84f1d2f
fixup! Expand merge keys in color patterns
Makihataima-Ken Sep 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions docs-master/Config.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspend the application | |
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | Edit config file | Open file in external editor. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
| `` Z `` | Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspend the application | |
| `` <ctrl+w> `` | 空白表示の切り替え | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | 設定ファイルを編集 | 外部エディタでファイルを開きます。 |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | 元に戻す | 最後のgitコマンドを元に戻すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |
| `` Z `` | やり直す | 最後のgitコマンドをやり直すために実行するgitコマンドを決定するためにreflogが使用されます。これにはワーキングツリーへの変更は含まれません。コミットのみが考慮されます。 |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspend the application | |
| `` <ctrl+w> `` | 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | 설정 파일 수정 | Open file in external editor. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | 되돌리기 (reflog) (실험적) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
| `` Z `` | 다시 실행 (reflog) (실험적) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_nl.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Pauzeer de applicatie | |
| `` <ctrl+w> `` | Witruimte weergeven in-/uitschakelen | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | Verander config bestand | Open bestand in externe editor. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | Ongedaan maken (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
| `` Z `` | Redo (via reflog) (experimenteel) | Het reflog wordt gebruikt om te bepalen welk git commando moet worden gebruikt om het laatste git commando te herhalen. Wijzigingen aan de working tree worden niet meegenomen, alleen command's zijn kandidaten. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspend the application | |
| `` <ctrl+w> `` | Przełącz białe znaki | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | Edytuj plik konfiguracyjny | Otwórz plik w zewnętrznym edytorze. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | Cofnij | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby cofnąć ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |
| `` Z `` | Ponów | Dziennik reflog zostanie użyty do określenia, jakie polecenie git należy uruchomić, aby ponowić ostatnie polecenie git. Nie obejmuje to zmian w drzewie roboczym; brane są pod uwagę tylko commity. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspender a aplicação | |
| `` <ctrl+w> `` | Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | Editar arquivo de configuração | Abrir arquivo no editor externo. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | Desfazer | O reflog será usado para determinar qual comando git para executar para desfazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |
| `` Z `` | Refazer | O reflog será usado para determinar qual comando git para executar para refazer o último comando git. Isto não inclui mudanças na árvore de trabalho; apenas compromissos são tidos em consideração. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | Suspend the application | |
| `` <ctrl+w> `` | Переключить отображение изменении пробелов в просмотрщике сравнении | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
| `` <alt+shift+c> `` | Редактировать файл конфигурации | Open file in external editor. |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | Отменить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git запустить, чтобы отменить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |
| `` Z `` | Повторить (через reflog) (экспериментальный) | Журнал ссылок (reflog) будет использоваться для определения того, какую команду git нужно запустить, чтобы повторить последнюю команду git. Сюда не входят изменения в рабочем дереве; учитываются только коммиты. |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | 挂起应用程序 | |
| `` <ctrl+w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
| `` <alt+shift+c> `` | 编辑配置文件 | 使用外部编辑器打开文件 |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |

Expand Down
1 change: 1 addition & 0 deletions docs-master/keybindings/Keybindings_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
| `` <ctrl+z> `` | 掛起應用程式 | |
| `` <ctrl+w> `` | 切換是否在差異檢視中顯示空格變更 | 切換是否在差異檢視中顯示空白字元更改。<br><br>預設值可在設定檔中透過鍵 'git.ignoreWhitespaceInDiffView' 更改。 |
| `` <alt+shift+c> `` | 編輯設定檔案 | 使用外部編輯器開啟 |
| `` # `` | Select theme | Switch to one of the theme files in the themes folder of your config directory. Your choice is remembered for future sessions. |
| `` z `` | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 |
| `` Z `` | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 |

Expand Down
20 changes: 13 additions & 7 deletions pkg/commands/patch/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ type patchPresenter struct {

// line indices for tagged lines (e.g. lines added to a custom patch)
incLineIndices *set.Set[int]

// the style of the text that isn't an addition, a deletion or a hunk range
defaultTextStyle style.TextStyle
}

// formats the patch as a plain string
Expand Down Expand Up @@ -44,16 +47,19 @@ type FormatViewOpts struct {
}

// formats the patch for rendering within a view, meaning it's coloured and
// highlights selected items
// highlights selected items. It reads the theme, so only the UI thread may
// call it; formatPlain doesn't read it, because workers build plain patches,
// for example to apply a custom patch during a rebase.
func formatView(patch *Patch, opts FormatViewOpts) string {
includedLineIndices := opts.IncLineIndices
if includedLineIndices == nil {
includedLineIndices = set.New[int]()
}
presenter := &patchPresenter{
patch: patch,
plain: false,
incLineIndices: includedLineIndices,
patch: patch,
plain: false,
incLineIndices: includedLineIndices,
defaultTextStyle: theme.DefaultTextColor,
}
return presenter.format()
}
Expand All @@ -75,7 +81,7 @@ func (self *patchPresenter) format() string {

for _, line := range self.patch.header {
// always passing false for 'included' here because header lines are not part of the patch
appendLine(self.formatLineAux(line, theme.DefaultTextColor.SetBold(), false))
appendLine(self.formatLineAux(line, self.defaultTextStyle.SetBold(), false))
}

for _, hunk := range self.patch.hunks {
Expand All @@ -90,7 +96,7 @@ func (self *patchPresenter) format() string {
// of the actual patch
self.formatLineAux(
hunk.headerContext,
theme.DefaultTextColor,
self.defaultTextStyle,
false,
),
)
Expand All @@ -115,7 +121,7 @@ func (self *patchPresenter) patchLineStyle(patchLine *PatchLine) style.TextStyle
case DELETION:
return style.FgRed
default:
return theme.DefaultTextColor
return self.defaultTextStyle
}
}

Expand Down
Loading