summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-05-18 16:25:26 +0200
committerJesse Duffield <jessedduffield@gmail.com>2023-05-20 12:58:32 +1000
commit401610c0ef736ec4c769aee743b9ba3ce46c4dd4 (patch)
tree2dbbf5becf1a75296df0bbbe78adb5a2a17e12f9
parent64b2685c2dfc34a5cb7f2870e06d649339cc3ccf (diff)
Remove the toast when toggling "ignore whitespace"
Now that we visualize the state, the toast is no longer needed.
-rw-r--r--pkg/gui/controllers/toggle_whitespace_action.go6
-rw-r--r--pkg/i18n/chinese.go2
-rw-r--r--pkg/i18n/english.go4
-rw-r--r--pkg/i18n/japanese.go4
-rw-r--r--pkg/i18n/korean.go2
-rw-r--r--pkg/integration/tests/diff/ignore_whitespace.go4
6 files changed, 1 insertions, 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`),