From d161afe37f2ef29a2b322e21e4bee38f1ba66d7c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 19 May 2023 19:34:29 +1000 Subject: [PATCH 1/5] Support ignoring whitespace on stash --- pkg/commands/git_commands/stash.go | 15 +++++++++-- pkg/commands/git_commands/stash_test.go | 36 ++++++++++++++++--------- pkg/gui/controllers/stash_controller.go | 7 ++++- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/pkg/commands/git_commands/stash.go b/pkg/commands/git_commands/stash.go index 572a87a73..54164e736 100644 --- a/pkg/commands/git_commands/stash.go +++ b/pkg/commands/git_commands/stash.go @@ -59,8 +59,19 @@ func (self *StashCommands) Sha(index int) (string, error) { return strings.Trim(sha, "\r\n"), err } -func (self *StashCommands) ShowStashEntryCmdObj(index int) oscommands.ICmdObj { - cmdStr := fmt.Sprintf("git stash show -p --stat --color=%s --unified=%d stash@{%d}", self.UserConfig.Git.Paging.ColorArg, self.UserConfig.Git.DiffContextSize, index) +func (self *StashCommands) ShowStashEntryCmdObj(index int, ignoreWhitespace bool) oscommands.ICmdObj { + ignoreWhitespaceFlag := "" + if ignoreWhitespace { + ignoreWhitespaceFlag = " --ignore-all-space" + } + + cmdStr := fmt.Sprintf( + "git stash show -p --stat --color=%s --unified=%d%s stash@{%d}", + self.UserConfig.Git.Paging.ColorArg, + self.UserConfig.Git.DiffContextSize, + ignoreWhitespaceFlag, + index, + ) return self.cmd.New(cmdStr).DontLog() } diff --git a/pkg/commands/git_commands/stash_test.go b/pkg/commands/git_commands/stash_test.go index 1a4e50822..2fb03b90e 100644 --- a/pkg/commands/git_commands/stash_test.go +++ b/pkg/commands/git_commands/stash_test.go @@ -99,24 +99,34 @@ func TestStashSha(t *testing.T) { func TestStashStashEntryCmdObj(t *testing.T) { type scenario struct { - testName string - index int - contextSize int - expected string + testName string + index int + contextSize int + ignoreWhitespace bool + expected string } scenarios := []scenario{ { - testName: "Default case", - index: 5, - contextSize: 3, - expected: "git stash show -p --stat --color=always --unified=3 stash@{5}", + testName: "Default case", + index: 5, + contextSize: 3, + ignoreWhitespace: false, + expected: "git stash show -p --stat --color=always --unified=3 stash@{5}", }, { - testName: "Show diff with custom context size", - index: 5, - contextSize: 77, - expected: "git stash show -p --stat --color=always --unified=77 stash@{5}", + testName: "Show diff with custom context size", + index: 5, + contextSize: 77, + ignoreWhitespace: false, + expected: "git stash show -p --stat --color=always --unified=77 stash@{5}", + }, + { + testName: "Default case", + index: 5, + contextSize: 3, + ignoreWhitespace: true, + expected: "git stash show -p --stat --color=always --unified=3 --ignore-all-space stash@{5}", }, } @@ -127,7 +137,7 @@ func TestStashStashEntryCmdObj(t *testing.T) { userConfig.Git.DiffContextSize = s.contextSize instance := buildStashCommands(commonDeps{userConfig: userConfig}) - cmdStr := instance.ShowStashEntryCmdObj(s.index).ToString() + cmdStr := instance.ShowStashEntryCmdObj(s.index, s.ignoreWhitespace).ToString() assert.Equal(t, s.expected, cmdStr) }) } diff --git a/pkg/gui/controllers/stash_controller.go b/pkg/gui/controllers/stash_controller.go index 4b5135884..e308abade 100644 --- a/pkg/gui/controllers/stash_controller.go +++ b/pkg/gui/controllers/stash_controller.go @@ -63,7 +63,12 @@ func (self *StashController) GetOnRenderToMain() func() error { if stashEntry == nil { task = types.NewRenderStringTask(self.c.Tr.NoStashEntries) } else { - task = types.NewRunPtyTask(self.c.Git().Stash.ShowStashEntryCmdObj(stashEntry.Index).GetCmd()) + task = types.NewRunPtyTask( + self.c.Git().Stash.ShowStashEntryCmdObj( + stashEntry.Index, + self.c.State().GetIgnoreWhitespaceInDiffView(), + ).GetCmd(), + ) } return self.c.RenderToMainViews(types.RefreshMainOpts{ From a2778f01c661468caaf2aa2c3476f58e9925dbc4 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 18 May 2023 16:05:08 +0200 Subject: [PATCH 2/5] Disregard the "ignore whitespace" option in the patch building panel It's not possible to reliably stage things into a custom patch when "ignore whitespace" is on, so always treat it as off here (like we do in the staging panel). It looks like this is a regression that was introduced in 8edad826ca. --- pkg/gui/controllers/helpers/patch_building_helper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/gui/controllers/helpers/patch_building_helper.go b/pkg/gui/controllers/helpers/patch_building_helper.go index 38f850886..7dd93e6a6 100644 --- a/pkg/gui/controllers/helpers/patch_building_helper.go +++ b/pkg/gui/controllers/helpers/patch_building_helper.go @@ -73,7 +73,9 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt ref := self.c.Contexts().CommitFiles.CommitFileTreeViewModel.GetRef() to := ref.RefName() from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName()) - diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true, self.c.State().GetIgnoreWhitespaceInDiffView()) + // Passing false for ignoreWhitespace because the patch building panel + // doesn't work when whitespace is ignored + diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true, false) if err != nil { return err } From 7d4bfb6621163244b5467ab6e6c40571726d7c81 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 18 May 2023 16:23:53 +0200 Subject: [PATCH 3/5] Don't toggle "ignore whitespace" in the staging and patch building panels The option doesn't have any affect in these views, so we don't need to toggle it here. But the problem was the HandleFocus call at the end: this would activate the wrong view, so we need to avoid it here. Show an error if the user tries to turn the option on, to let them know that it doesn't work here. --- pkg/gui/controllers/toggle_whitespace_action.go | 14 ++++++++++++++ pkg/i18n/english.go | 2 ++ 2 files changed, 16 insertions(+) diff --git a/pkg/gui/controllers/toggle_whitespace_action.go b/pkg/gui/controllers/toggle_whitespace_action.go index 56eb023f3..746d18bdf 100644 --- a/pkg/gui/controllers/toggle_whitespace_action.go +++ b/pkg/gui/controllers/toggle_whitespace_action.go @@ -1,7 +1,9 @@ package controllers import ( + "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/samber/lo" ) type ToggleWhitespaceAction struct { @@ -9,6 +11,18 @@ type ToggleWhitespaceAction struct { } func (self *ToggleWhitespaceAction) Call() error { + contextsThatDontSupportIgnoringWhitespace := []types.ContextKey{ + context.STAGING_MAIN_CONTEXT_KEY, + context.STAGING_SECONDARY_CONTEXT_KEY, + context.PATCH_BUILDING_MAIN_CONTEXT_KEY, + } + + if lo.Contains(contextsThatDontSupportIgnoringWhitespace, self.c.CurrentContext().GetKey()) { + // Ignoring whitespace is not supported in these views. Let the user + // know that it's not going to work in case they try to turn it on. + return self.c.ErrorMsg(self.c.Tr.IgnoreWhitespaceNotSupportedHere) + } + self.c.State().SetIgnoreWhitespaceInDiffView(!self.c.State().GetIgnoreWhitespaceInDiffView()) toastMessage := self.c.Tr.ShowingWhitespaceInDiffView diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 5e34022d3..c1d0b6c0c 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -483,6 +483,7 @@ type TranslationSet struct { ToggleWhitespaceInDiffView string IgnoringWhitespaceInDiffView string ShowingWhitespaceInDiffView string + IgnoreWhitespaceNotSupportedHere string IncreaseContextInDiffView string DecreaseContextInDiffView string CreatePullRequestOptions string @@ -1154,6 +1155,7 @@ func EnglishTranslationSet() TranslationSet { ToggleWhitespaceInDiffView: "Toggle whether or not whitespace changes are shown in the diff view", IgnoringWhitespaceInDiffView: "Whitespace will be ignored in the diff view", ShowingWhitespaceInDiffView: "Whitespace will be shown in the diff view", + IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view", IncreaseContextInDiffView: "Increase the size of the context shown around changes in the diff view", DecreaseContextInDiffView: "Decrease the size of the context shown around changes in the diff view", CreatePullRequest: "Create pull request", From 64b2685c2dfc34a5cb7f2870e06d649339cc3ccf Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 18 May 2023 15:29:37 +0200 Subject: [PATCH 4/5] Visualize the "ignore whitespace" state in the subtitle of the diff view --- pkg/gui/controllers/commits_files_controller.go | 5 +++-- pkg/gui/controllers/files_controller.go | 15 +++++++++------ pkg/gui/controllers/helpers/diff_helper.go | 13 +++++++++++-- pkg/gui/controllers/local_commits_controller.go | 5 +++-- pkg/gui/controllers/stash_controller.go | 5 +++-- pkg/gui/controllers/sub_commits_controller.go | 5 +++-- pkg/gui/main_panels.go | 2 ++ pkg/gui/types/rendering.go | 3 ++- pkg/i18n/english.go | 2 ++ 9 files changed, 38 insertions(+), 17 deletions(-) diff --git a/pkg/gui/controllers/commits_files_controller.go b/pkg/gui/controllers/commits_files_controller.go index b7f53ec69..e4cf18ffc 100644 --- a/pkg/gui/controllers/commits_files_controller.go +++ b/pkg/gui/controllers/commits_files_controller.go @@ -126,8 +126,9 @@ func (self *CommitFilesController) GetOnRenderToMain() func() error { return self.c.RenderToMainViews(types.RefreshMainOpts{ Pair: pair, Main: &types.ViewUpdateOpts{ - Title: self.c.Tr.Patch, - Task: task, + Title: self.c.Tr.Patch, + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: task, }, Secondary: secondaryPatchPanelUpdateOpts(self.c), }) diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index 65fd16891..2876f97fb 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -174,8 +174,9 @@ func (self *FilesController) GetOnRenderToMain() func() error { return self.c.RenderToMainViews(types.RefreshMainOpts{ Pair: self.c.MainViewPairs().Normal, Main: &types.ViewUpdateOpts{ - Title: self.c.Tr.DiffTitle, - Task: types.NewRenderStringTask(self.c.Tr.NoChangedFiles), + Title: self.c.Tr.DiffTitle, + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: types.NewRenderStringTask(self.c.Tr.NoChangedFiles), }, }) } @@ -209,8 +210,9 @@ func (self *FilesController) GetOnRenderToMain() func() error { refreshOpts := types.RefreshMainOpts{ Pair: pair, Main: &types.ViewUpdateOpts{ - Task: types.NewRunPtyTask(cmdObj.GetCmd()), - Title: title, + Task: types.NewRunPtyTask(cmdObj.GetCmd()), + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Title: title, }, } @@ -223,8 +225,9 @@ func (self *FilesController) GetOnRenderToMain() func() error { } refreshOpts.Secondary = &types.ViewUpdateOpts{ - Title: title, - Task: types.NewRunPtyTask(cmdObj.GetCmd()), + Title: title, + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: types.NewRunPtyTask(cmdObj.GetCmd()), } } diff --git a/pkg/gui/controllers/helpers/diff_helper.go b/pkg/gui/controllers/helpers/diff_helper.go index 701df93cd..8d18be2bf 100644 --- a/pkg/gui/controllers/helpers/diff_helper.go +++ b/pkg/gui/controllers/helpers/diff_helper.go @@ -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 "" +} diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index d3dbff9d4..76d9afc20 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -176,8 +176,9 @@ func (self *LocalCommitsController) GetOnRenderToMain() func() error { return self.c.RenderToMainViews(types.RefreshMainOpts{ Pair: self.c.MainViewPairs().Normal, Main: &types.ViewUpdateOpts{ - Title: "Patch", - Task: task, + Title: "Patch", + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: task, }, Secondary: secondaryPatchPanelUpdateOpts(self.c), }) diff --git a/pkg/gui/controllers/stash_controller.go b/pkg/gui/controllers/stash_controller.go index e308abade..0dac18f15 100644 --- a/pkg/gui/controllers/stash_controller.go +++ b/pkg/gui/controllers/stash_controller.go @@ -74,8 +74,9 @@ func (self *StashController) GetOnRenderToMain() func() error { return self.c.RenderToMainViews(types.RefreshMainOpts{ Pair: self.c.MainViewPairs().Normal, Main: &types.ViewUpdateOpts{ - Title: "Stash", - Task: task, + Title: "Stash", + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: task, }, }) }) diff --git a/pkg/gui/controllers/sub_commits_controller.go b/pkg/gui/controllers/sub_commits_controller.go index e887b29d6..485d49820 100644 --- a/pkg/gui/controllers/sub_commits_controller.go +++ b/pkg/gui/controllers/sub_commits_controller.go @@ -46,8 +46,9 @@ func (self *SubCommitsController) GetOnRenderToMain() func() error { return self.c.RenderToMainViews(types.RefreshMainOpts{ Pair: self.c.MainViewPairs().Normal, Main: &types.ViewUpdateOpts{ - Title: "Commit", - Task: task, + Title: "Commit", + SubTitle: self.c.Helpers().Diff.IgnoringWhitespaceSubTitle(), + Task: task, }, }) }) diff --git a/pkg/gui/main_panels.go b/pkg/gui/main_panels.go index e7c87c5e5..d3418b628 100644 --- a/pkg/gui/main_panels.go +++ b/pkg/gui/main_panels.go @@ -66,6 +66,8 @@ func (gui *Gui) RefreshMainView(opts *types.ViewUpdateOpts, context types.Contex view.Title = opts.Title } + view.Subtitle = opts.SubTitle + if err := gui.runTaskForView(view, opts.Task); err != nil { gui.c.Log.Error(err) return nil diff --git a/pkg/gui/types/rendering.go b/pkg/gui/types/rendering.go index b4e7bedcb..7a2f698ad 100644 --- a/pkg/gui/types/rendering.go +++ b/pkg/gui/types/rendering.go @@ -21,7 +21,8 @@ type MainViewPairs struct { } type ViewUpdateOpts struct { - Title string + Title string + SubTitle string Task UpdateTask } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index c1d0b6c0c..7f79cf077 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -481,6 +481,7 @@ type TranslationSet struct { RandomTip string SelectParentCommitForMerge string ToggleWhitespaceInDiffView string + IgnoreWhitespaceDiffViewSubTitle string IgnoringWhitespaceInDiffView string ShowingWhitespaceInDiffView string IgnoreWhitespaceNotSupportedHere string @@ -1153,6 +1154,7 @@ func EnglishTranslationSet() TranslationSet { RandomTip: "Random Tip", SelectParentCommitForMerge: "Select parent commit for merge", ToggleWhitespaceInDiffView: "Toggle whether or not whitespace changes are shown in the diff view", + IgnoreWhitespaceDiffViewSubTitle: "(ignoring whitespace)", IgnoringWhitespaceInDiffView: "Whitespace will be ignored in the diff view", ShowingWhitespaceInDiffView: "Whitespace will be shown in the diff view", IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view", From 401610c0ef736ec4c769aee743b9ba3ce46c4dd4 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 18 May 2023 16:25:26 +0200 Subject: [PATCH 5/5] Remove the toast when toggling "ignore whitespace" Now that we visualize the state, the toast is no longer needed. --- pkg/gui/controllers/toggle_whitespace_action.go | 6 ------ pkg/i18n/chinese.go | 2 -- pkg/i18n/english.go | 4 ---- pkg/i18n/japanese.go | 4 +--- pkg/i18n/korean.go | 2 -- pkg/integration/tests/diff/ignore_whitespace.go | 4 ---- 6 files changed, 1 insertion(+), 21 deletions(-) diff --git a/pkg/gui/controllers/toggle_whitespace_action.go b/pkg/gui/controllers/toggle_whitespace_action.go index 746d18bdf..f501338f4 100644 --- a/pkg/gui/controllers/toggle_whitespace_action.go +++ b/pkg/gui/controllers/toggle_whitespace_action.go @@ -25,11 +25,5 @@ func (self *ToggleWhitespaceAction) Call() error { self.c.State().SetIgnoreWhitespaceInDiffView(!self.c.State().GetIgnoreWhitespaceInDiffView()) - toastMessage := self.c.Tr.ShowingWhitespaceInDiffView - if self.c.State().GetIgnoreWhitespaceInDiffView() { - toastMessage = self.c.Tr.IgnoringWhitespaceInDiffView - } - self.c.Toast(toastMessage) - return self.c.CurrentSideContext().HandleFocus(types.OnFocusOpts{}) } diff --git a/pkg/i18n/chinese.go b/pkg/i18n/chinese.go index decbb4ea8..9c19bd410 100644 --- a/pkg/i18n/chinese.go +++ b/pkg/i18n/chinese.go @@ -437,8 +437,6 @@ func chineseTranslationSet() TranslationSet { RandomTip: "随机小提示", SelectParentCommitForMerge: "选择父提交进行合并", ToggleWhitespaceInDiffView: "切换是否在差异视图中显示空白字符差异", - IgnoringWhitespaceInDiffView: "将会在差异视图中忽略空格字符差异", - ShowingWhitespaceInDiffView: "将会在差异视图中显示空白字符差异", IncreaseContextInDiffView: "扩大差异视图中显示的上下文范围", DecreaseContextInDiffView: "缩小差异视图中显示的上下文范围", CreatePullRequest: "创建抓取请求", diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 7f79cf077..ea34ae022 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -482,8 +482,6 @@ type TranslationSet struct { SelectParentCommitForMerge string ToggleWhitespaceInDiffView string IgnoreWhitespaceDiffViewSubTitle string - IgnoringWhitespaceInDiffView string - ShowingWhitespaceInDiffView string IgnoreWhitespaceNotSupportedHere string IncreaseContextInDiffView string DecreaseContextInDiffView string @@ -1155,8 +1153,6 @@ func EnglishTranslationSet() TranslationSet { SelectParentCommitForMerge: "Select parent commit for merge", ToggleWhitespaceInDiffView: "Toggle whether or not whitespace changes are shown in the diff view", IgnoreWhitespaceDiffViewSubTitle: "(ignoring whitespace)", - IgnoringWhitespaceInDiffView: "Whitespace will be ignored in the diff view", - ShowingWhitespaceInDiffView: "Whitespace will be shown in the diff view", IgnoreWhitespaceNotSupportedHere: "Ignoring whitespace is not supported in this view", IncreaseContextInDiffView: "Increase the size of the context shown around changes in the diff view", DecreaseContextInDiffView: "Decrease the size of the context shown around changes in the diff view", diff --git a/pkg/i18n/japanese.go b/pkg/i18n/japanese.go index 1defdf1c9..d4efc55f0 100644 --- a/pkg/i18n/japanese.go +++ b/pkg/i18n/japanese.go @@ -452,9 +452,7 @@ func japaneseTranslationSet() TranslationSet { CommandLogHeader: "コマンドログの表示/非表示は '%s' で切り替えられます。\n", RandomTip: "ランダムTips", // SelectParentCommitForMerge: "Select parent commit for merge", - ToggleWhitespaceInDiffView: "空白文字の差分の表示有無を切り替え", - IgnoringWhitespaceInDiffView: "空白文字の変更は差分画面に表示されません", - ShowingWhitespaceInDiffView: "空白文字の変更は差分画面に表示されます", + ToggleWhitespaceInDiffView: "空白文字の差分の表示有無を切り替え", // IncreaseContextInDiffView: "Increase the size of the context shown around changes in the diff view", // DecreaseContextInDiffView: "Decrease the size of the context shown around changes in the diff view", CreatePullRequest: "pull requestを作成", diff --git a/pkg/i18n/korean.go b/pkg/i18n/korean.go index ebdcb2ea5..ffb5b5da4 100644 --- a/pkg/i18n/korean.go +++ b/pkg/i18n/korean.go @@ -452,8 +452,6 @@ func koreanTranslationSet() TranslationSet { RandomTip: "랜덤 Tip", SelectParentCommitForMerge: "병합을 위한 상위 커밋 선택", ToggleWhitespaceInDiffView: "공백문자를 Diff 뷰에서 표시 여부 전환", - IgnoringWhitespaceInDiffView: "공백문자를 Diff 뷰에서 무시", - ShowingWhitespaceInDiffView: "공백문자를 Diff 뷰에서 표시", IncreaseContextInDiffView: "diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기", DecreaseContextInDiffView: "diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기", CreatePullRequest: "풀 리퀘스트 생성", diff --git a/pkg/integration/tests/diff/ignore_whitespace.go b/pkg/integration/tests/diff/ignore_whitespace.go index 157d3e7ff..157a66da9 100644 --- a/pkg/integration/tests/diff/ignore_whitespace.go +++ b/pkg/integration/tests/diff/ignore_whitespace.go @@ -35,8 +35,6 @@ var IgnoreWhitespace = NewIntegrationTest(NewIntegrationTestArgs{ IsFocused(). Press(keys.Universal.ToggleWhitespaceInDiffView) - t.ExpectToast(Equals("Whitespace will be ignored in the diff view")) - // lines with only whitespace changes are ignored (first and third lines) t.Views().Main().ContainsLines( Contains(` first-line`), @@ -50,8 +48,6 @@ var IgnoreWhitespace = NewIntegrationTest(NewIntegrationTestArgs{ IsFocused(). Press(keys.Universal.ToggleWhitespaceInDiffView) - t.ExpectToast(Equals("Whitespace will be shown in the diff view")) - t.Views().Main().ContainsLines( Contains(`-first-line`), Contains(`-old-second-line`),