mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Visualize the "ignore whitespace" state in the subtitle of the diff view
This commit is contained in:
parent
7d4bfb6621
commit
64b2685c2d
9 changed files with 38 additions and 17 deletions
|
@ -59,8 +59,9 @@ func (self *DiffHelper) RenderDiff() error {
|
|||
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||
Pair: self.c.MainViewPairs().Normal,
|
||||
Main: &types.ViewUpdateOpts{
|
||||
Title: "Diff",
|
||||
Task: task,
|
||||
Title: "Diff",
|
||||
SubTitle: self.IgnoringWhitespaceSubTitle(),
|
||||
Task: task,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
@ -112,3 +113,11 @@ func (self *DiffHelper) WithDiffModeCheck(f func() error) error {
|
|||
|
||||
return f()
|
||||
}
|
||||
|
||||
func (self *DiffHelper) IgnoringWhitespaceSubTitle() string {
|
||||
if self.c.State().GetIgnoreWhitespaceInDiffView() {
|
||||
return self.c.Tr.IgnoreWhitespaceDiffViewSubTitle
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue