From 0ae34aeeb73947069977ff4c400123722b44d9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= Date: Thu, 2 Feb 2023 08:13:12 +0100 Subject: [PATCH 1/6] Make discarding items less error prone The menu is opened by `d` so this makes it harder to mess things up by accidentally pressing `dd`. --- pkg/gui/controllers/files_remove_controller.go | 4 ++-- pkg/gui/controllers/workspace_reset_controller.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/gui/controllers/files_remove_controller.go b/pkg/gui/controllers/files_remove_controller.go index 73449f1ec..4d9ffa426 100644 --- a/pkg/gui/controllers/files_remove_controller.go +++ b/pkg/gui/controllers/files_remove_controller.go @@ -51,7 +51,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'd', + Key: 'x', }, } @@ -95,7 +95,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'd', + Key: 'x', }, } diff --git a/pkg/gui/controllers/workspace_reset_controller.go b/pkg/gui/controllers/workspace_reset_controller.go index f34739af7..825d54214 100644 --- a/pkg/gui/controllers/workspace_reset_controller.go +++ b/pkg/gui/controllers/workspace_reset_controller.go @@ -31,7 +31,7 @@ func (self *FilesController) createResetMenu() error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'D', + Key: 'x', Tooltip: self.c.Tr.NukeDescription, }, { From 31b8524fe681345f5051c0b5d9b9c658a2b48c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= Date: Thu, 2 Feb 2023 11:08:33 +0100 Subject: [PATCH 2/6] Add tooltips for discarding --- pkg/gui/controllers/files_remove_controller.go | 12 ++++++++---- pkg/i18n/english.go | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkg/gui/controllers/files_remove_controller.go b/pkg/gui/controllers/files_remove_controller.go index 4d9ffa426..85815fb49 100644 --- a/pkg/gui/controllers/files_remove_controller.go +++ b/pkg/gui/controllers/files_remove_controller.go @@ -51,7 +51,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', + Key: 'x', + Tooltip: self.c.Tr.DiscardAllTooltip, }, } @@ -66,7 +67,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', + Key: 'u', + Tooltip: self.c.Tr.DiscardUnstagedTooltip, }) } } else { @@ -95,7 +97,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', + Key: 'x', + Tooltip: self.c.Tr.DiscardAllTooltip, }, } @@ -110,7 +113,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', + Key: 'u', + Tooltip: self.c.Tr.DiscardUnstagedTooltip, }) } } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 775a4c4bf..58604315e 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -115,6 +115,8 @@ type TranslationSet struct { LcRedoReflog string UndoTooltip string RedoTooltip string + DiscardAllTooltip string + DiscardUnstagedTooltip string LcPop string LcDrop string LcApply string @@ -762,6 +764,8 @@ func EnglishTranslationSet() TranslationSet { LcRedoReflog: "redo (via reflog) (experimental)", UndoTooltip: "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.", RedoTooltip: "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.", + DiscardAllTooltip: "Discard both staged and unstaged changes.", + DiscardUnstagedTooltip: "Discard unstaged changes.", LcPop: "pop", LcDrop: "drop", LcApply: "apply", From 38c7030b0f1cd62417e59091ebe68b4d387060a5 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 13:11:33 +1100 Subject: [PATCH 3/6] mention path in tooltips --- lxGxGkGpXF | 0 .../controllers/files_remove_controller.go | 37 +++++++++++++++---- pkg/i18n/english.go | 4 +- 3 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 lxGxGkGpXF diff --git a/lxGxGkGpXF b/lxGxGkGpXF new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/gui/controllers/files_remove_controller.go b/pkg/gui/controllers/files_remove_controller.go index 85815fb49..646118550 100644 --- a/pkg/gui/controllers/files_remove_controller.go +++ b/pkg/gui/controllers/files_remove_controller.go @@ -5,6 +5,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/jesseduffield/lazygit/pkg/utils" ) // splitting this action out into its own file because it's self-contained @@ -51,8 +52,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', - Tooltip: self.c.Tr.DiscardAllTooltip, + Key: 'x', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardAllTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }, } @@ -67,8 +73,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', - Tooltip: self.c.Tr.DiscardUnstagedTooltip, + Key: 'u', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardUnstagedTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }) } } else { @@ -97,8 +108,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', - Tooltip: self.c.Tr.DiscardAllTooltip, + Key: 'x', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardAllTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }, } @@ -113,8 +129,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', - Tooltip: self.c.Tr.DiscardUnstagedTooltip, + Key: 'u', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardUnstagedTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }) } } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 58604315e..ed89592e8 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -764,8 +764,8 @@ func EnglishTranslationSet() TranslationSet { LcRedoReflog: "redo (via reflog) (experimental)", UndoTooltip: "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.", RedoTooltip: "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.", - DiscardAllTooltip: "Discard both staged and unstaged changes.", - DiscardUnstagedTooltip: "Discard unstaged changes.", + DiscardAllTooltip: "Discard both staged and unstaged changes in '{{.path}}'.", + DiscardUnstagedTooltip: "Discard unstaged changes in '{{.path}}'.", LcPop: "pop", LcDrop: "drop", LcApply: "apply", From 56424eb1aa70673b1983cad3949fa91c7bab3e1a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 13:13:28 +1100 Subject: [PATCH 4/6] remove x keybinding for opening menu so we now only use '?' --- docs/Config.md | 2 +- docs/keybindings/Keybindings_en.md | 2 +- docs/keybindings/Keybindings_ja.md | 2 +- docs/keybindings/Keybindings_ko.md | 2 +- docs/keybindings/Keybindings_nl.md | 2 +- docs/keybindings/Keybindings_pl.md | 2 +- docs/keybindings/Keybindings_zh.md | 2 +- pkg/config/user_config.go | 2 +- pkg/gui/keybindings.go | 14 ++++++++------ pkg/gui/view_helpers.go | 6 +++--- 10 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/Config.md b/docs/Config.md index 34ca5df4e..024785f64 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -136,7 +136,7 @@ keybinding: jumpToBlock: ['1', '2', '3', '4', '5'] # goto the Nth block / panel nextMatch: 'n' prevMatch: 'N' - optionMenu: 'x' # show help menu + optionMenu: null # show help menu optionMenu-alt1: '?' # show help menu select: '' goInto: '' diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 067ee61a3..8142f6b65 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: view merge/rebase options ctrl+p: view custom patch options R: refresh - x: open menu + ?: open menu +: next screen mode (normal/half/fullscreen) _: prev screen mode ctrl+s: view filter-by-path options diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index bbcd1eabe..60f2739df 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: view merge/rebase options ctrl+p: view custom patch options R: リフレッシュ - x: メニューを開く + ?: メニューを開く +: 次のスクリーンモード (normal/half/fullscreen) _: 前のスクリーンモード ctrl+s: view filter-by-path options diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index 325661e03..100241e74 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: view merge/rebase options ctrl+p: 커스텀 Patch 옵션 보기 R: 새로고침 - x: 매뉴 열기 + ?: 매뉴 열기 +: 다음 스크린 모드 (normal/half/fullscreen) _: 이전 스크린 모드 ctrl+s: view filter-by-path options diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 6c5360c05..2f2276bf4 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: bekijk merge/rebase opties ctrl+p: bekijk aangepaste patch opties R: verversen - x: open menu + ?: open menu +: volgende scherm modus (normaal/half/groot) _: vorige scherm modus ctrl+s: bekijk scoping opties diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index 0d2ac0be1..be6368af3 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: widok scalenia/opcje zmiany bazy ctrl+p: view custom patch options R: odśwież - x: open menu + ?: open menu +: next screen mode (normal/half/fullscreen) _: prev screen mode ctrl+s: view filter-by-path options diff --git a/docs/keybindings/Keybindings_zh.md b/docs/keybindings/Keybindings_zh.md index e6ae31bbd..87fde590a 100644 --- a/docs/keybindings/Keybindings_zh.md +++ b/docs/keybindings/Keybindings_zh.md @@ -11,7 +11,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct m: 查看 合并/变基 选项 ctrl+p: 查看自定义补丁选项 R: 刷新 - x: 打开菜单 + ?: 打开菜单 +: 下一屏模式(正常/半屏/全屏) _: 上一屏模式 ctrl+s: 查看按路径过滤选项 diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 6fe880ce2..a4fc71579 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -450,7 +450,7 @@ func GetDefaultConfig() *UserConfig { NextMatch: "n", PrevMatch: "N", StartSearch: "/", - OptionMenu: "x", + OptionMenu: "", OptionMenuAlt1: "?", Select: "", GoInto: "", diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 35623b847..291c92288 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -145,17 +145,19 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi Description: self.c.Tr.LcRefresh, }, { - ViewName: "", - Key: opts.GetKey(opts.Config.Universal.OptionMenu), - Handler: self.handleCreateOptionsMenu, - Description: self.c.Tr.LcOpenMenu, - OpensMenu: true, + ViewName: "", + Key: opts.GetKey(opts.Config.Universal.OptionMenu), + Handler: self.handleCreateOptionsMenu, + OpensMenu: true, }, { ViewName: "", Key: opts.GetKey(opts.Config.Universal.OptionMenuAlt1), Modifier: gocui.ModNone, - Handler: self.handleCreateOptionsMenu, + // we have the description on the alt key and not the main key for legacy reasons + // (the original main key was 'x' but we've reassigned that to other purposes) + Description: self.c.Tr.LcOpenMenu, + Handler: self.handleCreateOptionsMenu, }, { ViewName: "status", diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index db4fe476d..c51942b03 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -107,9 +107,9 @@ func (gui *Gui) globalOptionsMap() map[string]string { return map[string]string{ fmt.Sprintf("%s/%s", keybindings.Label(keybindingConfig.Universal.ScrollUpMain), keybindings.Label(keybindingConfig.Universal.ScrollDownMain)): gui.c.Tr.LcScroll, fmt.Sprintf("%s %s %s %s", keybindings.Label(keybindingConfig.Universal.PrevBlock), keybindings.Label(keybindingConfig.Universal.NextBlock), keybindings.Label(keybindingConfig.Universal.PrevItem), keybindings.Label(keybindingConfig.Universal.NextItem)): gui.c.Tr.LcNavigate, - keybindings.Label(keybindingConfig.Universal.Return): gui.c.Tr.LcCancel, - keybindings.Label(keybindingConfig.Universal.Quit): gui.c.Tr.LcQuit, - keybindings.Label(keybindingConfig.Universal.OptionMenu): gui.c.Tr.LcMenu, + keybindings.Label(keybindingConfig.Universal.Return): gui.c.Tr.LcCancel, + keybindings.Label(keybindingConfig.Universal.Quit): gui.c.Tr.LcQuit, + keybindings.Label(keybindingConfig.Universal.OptionMenuAlt1): gui.c.Tr.LcMenu, fmt.Sprintf("%s-%s", keybindings.Label(keybindingConfig.Universal.JumpToBlock[0]), keybindings.Label(keybindingConfig.Universal.JumpToBlock[len(keybindingConfig.Universal.JumpToBlock)-1])): gui.c.Tr.LcJump, fmt.Sprintf("%s/%s", keybindings.Label(keybindingConfig.Universal.ScrollLeft), keybindings.Label(keybindingConfig.Universal.ScrollRight)): gui.c.Tr.LcScrollLeftRight, } From 6ee20840b2bbf94314bb2e185fdcdbc0ac1aaf0d Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 19 Feb 2023 13:29:04 +1100 Subject: [PATCH 5/6] migrate switch tab from menu test --- pkg/integration/tests/tests_gen.go | 2 ++ .../tests/ui/switch_tab_from_menu.go | 27 ++++++++++++++++++ .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/config | 8 ------ .../expected/repo/.git_keep/description | 1 - .../expected/repo/.git_keep/index | Bin 209 -> 0 bytes .../expected/repo/.git_keep/info/exclude | 6 ---- .../expected/repo/.git_keep/logs/HEAD | 3 -- .../repo/.git_keep/logs/refs/heads/master | 2 -- .../09/767bd3484e22b41138116992cc1cb5bc45fb7f | Bin 50 -> 0 bytes .../72/068e9a852a790a9b867e8b5d21cb4ede3ba4d7 | 2 -- .../c4/534c51b41b7c85f4fad4657885792d95797e8c | Bin 56 -> 0 bytes .../e0/aeb3ba0b32392aaf7d88a5190aca76be967225 | 2 -- .../e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 | Bin 15 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/.git_keep/refs/tags/0.0.1 | 1 - .../expected/repo/.git_keep/refs/tags/0.0.2 | 1 - .../switchTabFromMenu/expected/repo/file0 | 0 .../switchTabFromMenu/expected/repo/file1 | 0 .../switchTabFromMenu/recording.json | 1 - test/integration/switchTabFromMenu/setup.sh | 20 ------------- test/integration/switchTabFromMenu/test.json | 1 - 24 files changed, 29 insertions(+), 51 deletions(-) create mode 100644 pkg/integration/tests/ui/switch_tab_from_menu.go delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/FETCH_HEAD delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/config delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/description delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/index delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/info/exclude delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/09/767bd3484e22b41138116992cc1cb5bc45fb7f delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/72/068e9a852a790a9b867e8b5d21cb4ede3ba4d7 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/c4/534c51b41b7c85f4fad4657885792d95797e8c delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/e0/aeb3ba0b32392aaf7d88a5190aca76be967225 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/refs/tags/0.0.1 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/.git_keep/refs/tags/0.0.2 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/file0 delete mode 100644 test/integration/switchTabFromMenu/expected/repo/file1 delete mode 100644 test/integration/switchTabFromMenu/recording.json delete mode 100644 test/integration/switchTabFromMenu/setup.sh delete mode 100644 test/integration/switchTabFromMenu/test.json diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index 27ca095c1..7163e9fdf 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -22,6 +22,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/integration/tests/sync" "github.com/jesseduffield/lazygit/pkg/integration/tests/tag" "github.com/jesseduffield/lazygit/pkg/integration/tests/undo" + "github.com/jesseduffield/lazygit/pkg/integration/tests/ui" ) var tests = []*components.IntegrationTest{ @@ -101,4 +102,5 @@ var tests = []*components.IntegrationTest{ tag.Reset, undo.UndoCheckoutAndDrop, undo.UndoDrop, + ui.SwitchTabFromMenu, } diff --git a/pkg/integration/tests/ui/switch_tab_from_menu.go b/pkg/integration/tests/ui/switch_tab_from_menu.go new file mode 100644 index 000000000..0a5b56c23 --- /dev/null +++ b/pkg/integration/tests/ui/switch_tab_from_menu.go @@ -0,0 +1,27 @@ +package ui + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var SwitchTabFromMenu = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Switch tab via the options menu", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) { + config.UserConfig.Git.AutoFetch = false + }, + SetupRepo: func(shell *Shell) { + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files().IsFocused(). + Press(keys.Universal.OptionMenuAlt1) + + t.ExpectPopup().Menu().Title(Equals("Menu")). + Select(Contains("next tab")). + Confirm() + + t.Views().Submodules().IsFocused() + }, +}) diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/switchTabFromMenu/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index dc3ab4abe..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -file0 diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/FETCH_HEAD b/test/integration/switchTabFromMenu/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/HEAD b/test/integration/switchTabFromMenu/expected/repo/.git_keep/HEAD deleted file mode 100644 index b44fbb2b7..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/config b/test/integration/switchTabFromMenu/expected/repo/.git_keep/config deleted file mode 100644 index 596ebaeb3..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/config +++ /dev/null @@ -1,8 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true -[user] - email = CI@example.com - name = CI diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/description b/test/integration/switchTabFromMenu/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/index b/test/integration/switchTabFromMenu/expected/repo/.git_keep/index deleted file mode 100644 index 91ccc35d0eaf12a52924af97e0ec7a1721de44be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmZ?q402{*U|<5_gcGkC)pMQFU^D~6KPJXE(qaq@jY}99m|p<#O`tl4XLBFT-gNPr zvv;@Vy7H(Sho1BVPh?6+FrzpkWKv{vd)t*q-QSA6|Fa<1uo@r!jn=^3@VQ}-m@0{{mPPDua& diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/info/exclude b/test/integration/switchTabFromMenu/expected/repo/.git_keep/info/exclude deleted file mode 100644 index a5196d1be..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/HEAD b/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 06099d5d9..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,3 +0,0 @@ -0000000000000000000000000000000000000000 e0aeb3ba0b32392aaf7d88a5190aca76be967225 CI 1623779969 +0200 commit (initial): file0 -e0aeb3ba0b32392aaf7d88a5190aca76be967225 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI 1623779969 +0200 commit: file0 -72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI 1623779976 +0200 checkout: moving from master to 0.0.2 diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index e0e6c2284..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 e0aeb3ba0b32392aaf7d88a5190aca76be967225 CI 1623779969 +0200 commit (initial): file0 -e0aeb3ba0b32392aaf7d88a5190aca76be967225 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI 1623779969 +0200 commit: file0 diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/09/767bd3484e22b41138116992cc1cb5bc45fb7f b/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/09/767bd3484e22b41138116992cc1cb5bc45fb7f deleted file mode 100644 index d09fb5ad6408a5f924793e8b825d8666b6f550a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmbRj diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/72/068e9a852a790a9b867e8b5d21cb4ede3ba4d7 b/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/72/068e9a852a790a9b867e8b5d21cb4ede3ba4d7 deleted file mode 100644 index 68bf82fc1..000000000 --- a/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/72/068e9a852a790a9b867e8b5d21cb4ede3ba4d7 +++ /dev/null @@ -1,2 +0,0 @@ -xK -0@] L>cNИR"x|{7oxWzkЖ2]|pXRc,t%!ŰddK cBxCOOSMn"Q$}5`:95\u~P49c \ No newline at end of file diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/c4/534c51b41b7c85f4fad4657885792d95797e8c b/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/c4/534c51b41b7c85f4fad4657885792d95797e8c deleted file mode 100644 index 58277c3d5c83427fe129a5875c340328405eaf24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56 zcmbxzN]Y7+t \ No newline at end of file diff --git a/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 b/test/integration/switchTabFromMenu/expected/repo/.git_keep/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 deleted file mode 100644 index 711223894375fe1186ac5bfffdc48fb1fa1e65cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15 Wcmb Date: Mon, 20 Feb 2023 19:29:15 +1100 Subject: [PATCH 6/6] rerun test generator --- pkg/integration/tests/tests_gen.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index 7163e9fdf..c88ed636f 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -21,8 +21,8 @@ import ( "github.com/jesseduffield/lazygit/pkg/integration/tests/submodule" "github.com/jesseduffield/lazygit/pkg/integration/tests/sync" "github.com/jesseduffield/lazygit/pkg/integration/tests/tag" - "github.com/jesseduffield/lazygit/pkg/integration/tests/undo" "github.com/jesseduffield/lazygit/pkg/integration/tests/ui" + "github.com/jesseduffield/lazygit/pkg/integration/tests/undo" ) var tests = []*components.IntegrationTest{ @@ -100,7 +100,7 @@ var tests = []*components.IntegrationTest{ tag.CrudAnnotated, tag.CrudLightweight, tag.Reset, + ui.SwitchTabFromMenu, undo.UndoCheckoutAndDrop, undo.UndoDrop, - ui.SwitchTabFromMenu, }