summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-06-13 11:01:26 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-08-06 13:49:11 +1000
commit524bf83a4a681408c3fb57818f6968cab632e0ae (patch)
tree8858b4ee8d4670dcdd1637fe5fedf00ff080c154
parent6dfef08efc5c7f262194c0af35fd777428f33a1a (diff)
refactor to only have one context per view
-rw-r--r--docs/Config.md2
-rw-r--r--docs/keybindings/Keybindings_en.md35
-rw-r--r--docs/keybindings/Keybindings_ja.md35
-rw-r--r--docs/keybindings/Keybindings_ko.md35
-rw-r--r--docs/keybindings/Keybindings_nl.md35
-rw-r--r--docs/keybindings/Keybindings_pl.md35
-rw-r--r--docs/keybindings/Keybindings_zh.md35
-rw-r--r--go.mod10
-rw-r--r--go.sum19
-rw-r--r--pkg/cheatsheet/generate.go31
-rw-r--r--pkg/cheatsheet/generate_test.go31
-rw-r--r--pkg/commands/git_commands/branch.go2
-rw-r--r--pkg/commands/patch/patch_manager.go2
-rw-r--r--pkg/commands/patch/patch_parser.go18
-rw-r--r--pkg/gui/arrangement.go11
-rw-r--r--pkg/gui/branches_panel.go1
-rw-r--r--pkg/gui/command_log_panel.go8
-rw-r--r--pkg/gui/commit_files_panel.go45
-rw-r--r--pkg/gui/commits_panel.go16
-rw-r--r--pkg/gui/confirmation_panel.go9
-rw-r--r--pkg/gui/context.go192
-rw-r--r--pkg/gui/context/base_context.go62
-rw-r--r--pkg/gui/context/branches_context.go9
-rw-r--r--pkg/gui/context/commit_files_context.go9
-rw-r--r--pkg/gui/context/context.go189
-rw-r--r--pkg/gui/context/list_context_trait.go25
-rw-r--r--pkg/gui/context/local_commits_context.go9
-rw-r--r--pkg/gui/context/menu_context.go15
-rw-r--r--pkg/gui/context/patch_explorer_context.go134
-rw-r--r--pkg/gui/context/reflog_commits_context.go9
-rw-r--r--pkg/gui/context/remote_branches_context.go9
-rw-r--r--pkg/gui/context/remotes_context.go9
-rw-r--r--pkg/gui/context/simple_context.go41
-rw-r--r--pkg/gui/context/stash_context.go9
-rw-r--r--pkg/gui/context/sub_commits_context.go9
-rw-r--r--pkg/gui/context/submodules_context.go9
-rw-r--r--pkg/gui/context/suggestions_context.go9
-rw-r--r--pkg/gui/context/tags_context.go9
-rw-r--r--pkg/gui/context/view_trait.go8
-rw-r--r--pkg/gui/context/working_tree_context.go9
-rw-r--r--pkg/gui/context_config.go209
-rw-r--r--pkg/gui/controllers.go103
-rw-r--r--pkg/gui/controllers/bisect_controller.go2
-rw-r--r--pkg/gui/controllers/commits_files_controller.go10
-rw-r--r--pkg/gui/controllers/context_lines_controller.go116
-rw-r--r--pkg/gui/controllers/files_controller.go32
-rw-r--r--pkg/gui/controllers/helpers/patch_building_helper.go37
-rw-r--r--pkg/gui/controllers/list_controller.go37
-rw-r--r--pkg/gui/controllers/patch_building_controller.go138
-rw-r--r--pkg/gui/controllers/patch_explorer_controller.go289
-rw-r--r--pkg/gui/controllers/scroll_controller.go70
-rw-r--r--pkg/gui/controllers/staging_controller.go242
-rw-r--r--pkg/gui/custom_patch_options_panel.go (renamed from pkg/gui/patch_options_panel.go)34
-rw-r--r--pkg/gui/diff_context_size.go78
-rw-r--r--pkg/gui/diffing.go1
-rw-r--r--pkg/gui/files_panel.go36
-rw-r--r--pkg/gui/global_handlers.go47
-rw-r--r--pkg/gui/gui.go80
-rw-r--r--pkg/gui/gui_common.go22
-rw-r--r--pkg/gui/keybindings.go401
-rw-r--r--pkg/gui/layout.go64
-rw-r--r--pkg/gui/line_by_line_panel.go275
-rw-r--r--pkg/gui/list_context_config.go32
-rw-r--r--pkg/gui/main_panels.go91
-rw-r--r--pkg/gui/merge_panel.go12
-rw-r--r--pkg/gui/modes.go2
-rw-r--r--pkg/gui/options_menu_panel.go4
-rw-r--r--pkg/gui/patch_building_panel.go134
-rw-r--r--pkg/gui/patch_exploring/focus.go (renamed from pkg/gui/lbl/focus.go)2
-rw-r--r--pkg/gui/patch_exploring/focus_test.go (renamed from pkg/gui/lbl/focus_test.go)2
-rw-r--r--pkg/gui/patch_exploring/state.go (renamed from pkg/gui/lbl/state.go)19
-rw-r--r--pkg/gui/pty.go18
-rw-r--r--pkg/gui/recent_repos_panel.go1
-rw-r--r--pkg/gui/reflog_panel.go1
-rw-r--r--pkg/gui/refresh.go168
-rw-r--r--pkg/gui/remote_branches_panel.go1
-rw-r--r--pkg/gui/remotes_panel.go1
-rw-r--r--pkg/gui/services/custom_commands/keybinding_creator.go15
-rw-r--r--pkg/gui/side_window.go14
-rw-r--r--pkg/gui/staging_panel.go227
-rw-r--r--pkg/gui/stash_panel.go1
-rw-r--r--pkg/gui/status_panel.go3
-rw-r--r--pkg/gui/sub_commits_panel.go1
-rw-r--r--pkg/gui/submodules_panel.go1
-rw-r--r--pkg/gui/tags_panel.go9
-rw-r--r--pkg/gui/tasks_adapter.go6
-rw-r--r--pkg/gui/types/common.go4
-rw-r--r--pkg/gui/types/context.go40
-rw-r--r--pkg/gui/types/keybindings.go1
-rw-r--r--pkg/gui/types/refresh.go3
-rw-r--r--pkg/gui/view_helpers.go78
-rw-r--r--pkg/gui/views.go160
-rw-r--r--pkg/gui/window.go73
-rw-r--r--pkg/i18n/chinese.go4
-rw-r--r--pkg/i18n/dutch.go4
-rw-r--r--pkg/i18n/english.go12
-rw-r--r--pkg/i18n/japanese.go4
-rw-r--r--pkg/i18n/korean.go160
-rw-r--r--pkg/i18n/polish.go2
-rw-r--r--pkg/tasks/tasks.go2
-rw-r--r--pkg/utils/utils.go4
-rw-r--r--pkg/utils/utils_test.go42
-rw-r--r--test/integration/staging/expected/repo/.git_keep/indexbin281 -> 281 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/logs/HEAD4
-rw-r--r--test/integration/staging/expected/repo/.git_keep/logs/refs/heads/master4
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/05/9586b468b89bf98e3b62126f455ab15bea4a5fbin108 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/0b/6860367a6e7794985007cadf0aaf04c801e59ebin146 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/3e/95c983db9349a26b20fccbdaa933e805ff817ebin367 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/40/ce5b93f72e04cb876afaaf91398c2821260b95bin394 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/64/97d00f0447159947a805f3a38e8c44ed2865b1bin0 -> 118 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/6f/7e9e66f080162af7ebab016d02550145cfda66bin118 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/73/f226ec630e261c016df5bd80e3156eaba42d7ebin0 -> 482 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/a4/7182dc057408b3c6b1749cb46db0e0c5fd626bbin2328 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/a6/985076907d3ed64cf59480bb2eec313ea221cfbin0 -> 147 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/ac/43b10fa95a2d2ee6a028c0d0ea878f887d7c51bin0 -> 2334 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/b6/77e3e5777e122a22ebb001532c5017b199b0c02
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/b7/9b845289f08703b6ffb8927da9665efda4356f2
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/d6/9b45d6d14e1864411d17930012210271c400c32
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/dc/02541428fdc15b30bd2174fcbcd43d388eab82bin2331 -> 0 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/e7/86ecad3cea3651947e6c2648f6dae87372276bbin0 -> 109 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/objects/eb/38d1e424df18868f73407ca8087b6350b59f3ebin0 -> 2262 bytes
-rw-r--r--test/integration/staging/expected/repo/.git_keep/refs/heads/master2
-rw-r--r--test/integration/staging/expected/repo/three.txt7
-rw-r--r--test/integration/staging/expected/repo/two.txt12
-rw-r--r--test/integration/staging/recording.json2
-rw-r--r--test/integration/staging/test.json2
-rw-r--r--test/integration/stagingDiscard/expected/repo/.git_keep/COMMIT_EDITMSG (renamed from test/integration/stagingTwo/expected/repo/.git_keep/COMMIT_EDITMSG)0
-rw-r--r--