1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-04 10:34:55 +02:00

Remove the toast when toggling "ignore whitespace"

Now that we visualize the state, the toast is no longer needed.
This commit is contained in:
Stefan Haller 2023-05-18 16:25:26 +02:00 committed by Jesse Duffield
parent 64b2685c2d
commit 401610c0ef
6 changed files with 1 additions and 21 deletions

View File

@ -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{})
}

View File

@ -437,8 +437,6 @@ func chineseTranslationSet() TranslationSet {
RandomTip: "随机小提示",
SelectParentCommitForMerge: "选择父提交进行合并",
ToggleWhitespaceInDiffView: "切换是否在差异视图中显示空白字符差异",
IgnoringWhitespaceInDiffView: "将会在差异视图中忽略空格字符差异",
ShowingWhitespaceInDiffView: "将会在差异视图中显示空白字符差异",
IncreaseContextInDiffView: "扩大差异视图中显示的上下文范围",
DecreaseContextInDiffView: "缩小差异视图中显示的上下文范围",
CreatePullRequest: "创建抓取请求",

View File

@ -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",

View File

@ -453,8 +453,6 @@ func japaneseTranslationSet() TranslationSet {
RandomTip: "ランダムTips",
// SelectParentCommitForMerge: "Select parent commit for merge",
ToggleWhitespaceInDiffView: "空白文字の差分の表示有無を切り替え",
IgnoringWhitespaceInDiffView: "空白文字の変更は差分画面に表示されません",
ShowingWhitespaceInDiffView: "空白文字の変更は差分画面に表示されます",
// 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を作成",

View File

@ -452,8 +452,6 @@ func koreanTranslationSet() TranslationSet {
RandomTip: "랜덤 Tip",
SelectParentCommitForMerge: "병합을 위한 상위 커밋 선택",
ToggleWhitespaceInDiffView: "공백문자를 Diff 뷰에서 표시 여부 전환",
IgnoringWhitespaceInDiffView: "공백문자를 Diff 뷰에서 무시",
ShowingWhitespaceInDiffView: "공백문자를 Diff 뷰에서 표시",
IncreaseContextInDiffView: "diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기",
DecreaseContextInDiffView: "diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기",
CreatePullRequest: "풀 리퀘스트 생성",

View File

@ -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`),