Commit graph

409 commits

Author SHA1 Message Date
Jesse Duffield 482bdc4f1e more refactoring 2022-03-17 19:13:40 +11:00
Jesse Duffield 8e3484d8e9 add global controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 226985bf76 refactor keybindings 2022-03-17 19:13:40 +11:00
Jesse Duffield 2a1e3faa0c resetting controllers on new repo 2022-03-17 19:13:40 +11:00
Jesse Duffield c703cd8f88 fix suggestions panel 2022-03-17 19:13:40 +11:00
Jesse Duffield 0a8cff6ab6 some more refactoring 2022-03-17 19:13:40 +11:00
Jesse Duffield 09dc160da9 cleaning up 2022-03-17 19:13:40 +11:00
Jesse Duffield e187293456 moving more into controllers package 2022-03-17 19:13:40 +11:00
Jesse Duffield e363606fb6 move context keys into context package 2022-03-17 19:13:40 +11:00
Jesse Duffield 138be04e65 refactor contexts code 2022-03-17 19:13:40 +11:00
Jesse Duffield a2318d75b5 fix some things 2022-03-17 19:13:40 +11:00
Jesse Duffield 1dd7307fde start moving commit panel handlers into controller
more

and more

move rebase commit refreshing into existing abstraction

and more

and more

WIP

and more

handling clicks

properly fix merge conflicts

update cheatsheet

lots more preparation to start moving things into controllers

WIP

better typing

expand on remotes controller

moving more code into controllers
2022-03-17 19:13:40 +11:00
Jesse Duffield a90b6efded start refactoring gui 2022-03-17 19:13:40 +11:00
Jesse Duffield 1b09674ce8 simplify submodule remove 2022-01-29 00:17:32 +11:00
Jesse Duffield c8cc18920f improve merge conflict flow 2022-01-26 14:50:47 +11:00
Jesse Duffield 4ab5e54139 add support for git bisect 2022-01-22 10:48:51 +11:00
Jesse Duffield 0dfd02c42d allow rewording old commits 2022-01-09 14:14:47 +11:00
Jesse Duffield f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
Jesse Duffield 01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
Jesse Duffield f89747451a allow opening a commit in the browser 2021-12-29 09:01:06 +11:00
DerTeta f7ffbbd72a Add a menu entry and keybinding to { for decreasing the context size 2021-12-06 22:37:28 +11:00
DerTeta 0fbde05928 Add a menu item and keybinding to } to increase the context size 2021-12-06 22:37:28 +11:00
Jesse Duffield ccd80a0e4b add menu options for log stuff 2021-11-05 07:58:21 +11:00
Jesse Duffield 37be9dbea1 support scrolling left and right 2021-11-05 07:58:21 +11:00
Sam Burville 5df0475612 Add variable to simplify JumpToBlock keybinding
This removes the magic '5' and instead uses the number of windows.
2021-10-22 22:38:26 +11:00
Sam Burville f6e316dfe5 Improve JumpToBlock keybinding functionality
Improve experience when yaml file has != 5 keybindings and change view
helper to use the length of the array instead of hardcoded value.
2021-10-22 22:38:26 +11:00
Sam Burville 91e8765d9c Add JumpToBlock keybinding
This should allow users to decide their own keybinding for jumping
between blocks/panels.
E.g. A user could choose 5-9 instead of 1-5.
2021-10-22 22:38:26 +11:00
Jesse Duffield 87e9d9bdc2 minor changes 2021-10-16 21:18:43 +11:00
Hrishikesh Hiraskar b6454755ca copy selected text to clipboard 2021-10-16 21:18:43 +11:00
Ryooooooga df4eb70ba2 Fix translations 2021-08-25 22:23:55 +10:00
Ryooooooga a0e7604f61 Support git config merge.conflictStyle diff3 2021-08-25 22:23:55 +10:00
Liberatys 2dc6f5f079 Implement state filtering for commit files 2021-08-25 20:13:50 +10:00
Ryooooooga 4f66093335
introduce edit command template to open a specifig line of a file 2021-08-03 21:42:14 +09:00
Denis Palashevskii bccf203a18 Fix menu item color 2021-07-27 21:30:08 +10:00
Denis Palashevskii b590397dce Update docs 2021-07-27 21:30:08 +10:00
Denis Palashevskii 0e6598adbd Implement pull request options menu 2021-07-27 21:30:08 +10:00
Davyd McColl 22a6771e51 🎨 run go fmt against the file directly ftw 2021-07-01 17:13:13 +10:00
Davyd McColl a9f04d3925 facilitate toggling whitespace in the diff view with a hotkey (c-w by default) 2021-07-01 17:13:13 +10:00
Liberatys 44f7fc6f7c Add global binding to open recent repos 2021-05-30 13:25:44 +10:00
Jesse Duffield 3b7e7a7f56 add random tip to command log 2021-04-12 21:48:08 +10:00
Jesse Duffield 393ce05860 allow focusing on command log view 2021-04-11 17:07:49 +10:00
Jesse Duffield 4f03d7733a allow showing, hiding, and scrolling the extras panel 2021-04-11 17:07:49 +10:00
Jesse Duffield f2007f4d95 support scrolling extras view 2021-04-11 17:07:49 +10:00
Jesse Duffield 9f4433d8b5 allow opening merge tool 2021-04-11 10:21:53 +10:00
Jesse Duffield ccebe5e069 change language 2021-04-06 19:34:32 +10:00
Jesse Duffield d627b3bfc8 more refactoring 2021-04-06 19:34:32 +10:00
Jesse Duffield 4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
Jesse Duffield 0898a7bb57 refactor 2021-04-06 19:34:32 +10:00
Jesse Duffield f1d7f59e49 switching repos without restarting the gui 2021-04-06 19:34:32 +10:00
Jesse Duffield 798d3e2d54 get rid of these positively ghastly method signatures 2021-04-06 19:34:32 +10:00
Jesse Duffield 1a5f380c00 support alt-enter for inserting newline when typing commit message within the app 2021-04-06 19:34:32 +10:00
Jesse Duffield 3ea5e4d4b2 allow scrolling when staging lines or building patch 2021-04-06 19:34:32 +10:00
Jesse Duffield 0d6ff7d1b7 support backtab key 2021-04-06 19:34:32 +10:00
Jesse Duffield 6472bda29e bump gocui 2021-04-06 19:34:32 +10:00
Jesse Duffield 6a6024e38f use tcell via porting over code from awesome-gocui 2021-04-06 19:34:32 +10:00
Jesse Duffield eeeef9ca86 refactor 2021-04-02 11:09:12 +11:00
Jesse Duffield 8dee06f83a allow toggling tree view for commit files panel 2021-04-02 11:00:15 +11:00
Jesse Duffield da6fe01eca allow toggling on/off file tree mode 2021-03-30 21:57:00 +11:00
Jesse Duffield cd0532b4d6 allow ignoring directories 2021-03-30 21:57:00 +11:00
Jesse Duffield 418621a9ff support discarding changes in dir 2021-03-30 21:57:00 +11:00
Jesse Duffield f871724ae6 update wording 2021-03-30 21:57:00 +11:00
1jz 50dd7b00c3 add colors to differentiate action and menu commands 2021-02-16 13:52:04 -08:00
Yuki Osaki 90ade3225f Add lc prefix 2020-11-28 19:19:47 +11:00
Yuki Osaki 4928d1d490 Visualize the commits for all branches 2020-11-28 19:19:47 +11:00
Farzad Majidfayyaz 79888d3bde Add mapping to copy a pull request URL to the clipboard 2020-11-19 09:43:51 +11:00
Jesse Duffield b1dd3c4866 support rebinding confirm/newline keys in editor 2020-10-13 08:21:09 +11:00
nullawhale 1ff405edd8 Copy a commit message to clipboard: Changes to latest version 2020-10-12 21:04:01 +11:00
Jesse Duffield 4c9ec88be5 fix mutex deadlock 2020-10-10 00:23:01 +11:00
Jesse Duffield bb081ca764 more mutex safety with staging panel 2020-10-10 00:23:01 +11:00
Jesse Duffield 2e05ac0c90 paging keybindings for line by line panel
support searching in line by line panel

move mutexes into their own struct

add line by line panel mutex

apply LBL panel mutex

bump gocui to prevent crashing when search item count decreases
2020-10-10 00:23:01 +11:00
Jesse Duffield 37bb89dac3 type i18n 2020-10-10 00:23:01 +11:00
Jesse Duffield 4912205adb remove viper
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield 76f7726c47 dont close over loop variables ugh I hate this language feature 2020-10-02 20:05:45 +10:00
Jesse Duffield 7be474bd83 update keybindings 2020-10-02 08:09:42 +10:00
Jesse Duffield 2dc848506c bulk submodule menu 2020-10-02 08:09:42 +10:00
Jesse Duffield 86dd9d87dd allow updating submodule 2020-10-02 08:09:42 +10:00
Jesse Duffield da3e00823f allow submodule init and show submodule diff with a prefix 2020-10-02 08:09:42 +10:00
Jesse Duffield 71d4c552af allow updating submodule url 2020-10-02 08:09:42 +10:00
Jesse Duffield d4ab607d0d allow adding a submodule 2020-10-02 08:09:42 +10:00
Jesse Duffield ea307c8d94 add more submodule commands 2020-10-02 08:09:42 +10:00
Jesse Duffield 7b4a0f20b2 add submodules context 2020-10-02 08:09:42 +10:00
Jesse Duffield 3b93b5dde4 make it easier to add a tab to a view 2020-10-02 08:09:42 +10:00
Jesse Duffield a09bb5d4d8 better validation messages 2020-09-27 09:49:30 +10:00
Jesse Duffield da8eac5538 better interface 2020-09-27 09:49:30 +10:00
Jesse Duffield 67bbeb195b support custom keybindings 2020-09-27 09:49:30 +10:00
Jesse Duffield dd29ee7288 convert to string in a better way because I'm pretty sure alpine needs it 2020-09-26 11:12:47 +10:00
Yuki Osaki 1fd89b4f46 Be able to copy file name 2020-09-21 15:35:50 +10:00
Jesse Duffield 1494a3863d Remove tab keybinding for cycling tab
This keybinding has been more pain than it's worth. Having a tab keybinding
to cycle tabs implies that you can shift+tab and when you shift+tab the
application exits because termbox, our dependency, doesn't know how to
interpret the escape sequence (so it takes it for an actual ESC key which
will exit lazygit at the top level).

If people get mad at me they can set nextBlock-alt to <tab> and they'll have
the functionality back :)
2020-08-25 10:48:13 +00:00
Jesse Duffield f5c55f066b use new branch logic when 'checking out' remote branch 2020-08-25 09:25:17 +00:00
Jesse Duffield 3ebb91c07a better keybinding ('W') for viewing diff 2020-08-24 23:08:05 +00:00
Jesse Duffield 66bd86b9b7 set keybindings after initialising views 2020-08-23 17:49:58 +10:00
Jesse Duffield 438abd6003 centralise code for copying to clipboard 2020-08-23 14:29:18 +10:00
Jesse Duffield 442f6cd854 more cherry picking stuff, mostly around the reflog 2020-08-23 14:29:18 +10:00
Jesse Duffield c2b154acad better handling of our different modes and also cherry picking 2020-08-23 14:29:18 +10:00
Jesse Duffield fbd61fcd17 refactor how we handle different modes 2020-08-23 14:29:18 +10:00
Jesse Duffield 63209ef71e try allowing creating branches off the stash too 2020-08-23 14:29:18 +10:00
Jesse Duffield f63ec38aae genericise creating new branches off things 2020-08-23 14:29:18 +10:00
Jesse Duffield 974c6510b8 add sub commit context 2020-08-23 14:29:18 +10:00
Jesse Duffield 2d90e1e8ee commit files kind of generalised 2020-08-23 14:29:18 +10:00
Jesse Duffield ddf25e14af allowing commit files to be viewed in reflog as well 2020-08-23 14:29:18 +10:00
Jesse Duffield a59ac064d2 statically define context keys 2020-08-23 14:29:18 +10:00
Jesse Duffield 433d54fcec WIP constants for context keys 2020-08-23 14:29:18 +10:00
Jesse Duffield 99707a527d WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield bc410d8e4a use camelCase 2020-08-23 14:29:18 +10:00
Jesse Duffield e4beaf4de9 more stuff 2020-08-23 14:29:18 +10:00
Jesse Duffield 4f4df8f9cc move context specific keybindings into context file 2020-08-23 14:29:18 +10:00
Jesse Duffield ac0eedda91 lots more stuff 2020-08-23 14:29:18 +10:00
Jesse Duffield 6fb83b740b WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield 7f89113245 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield 0ea0c48631 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield 44d8b3e8f3 allow overriding default confirm/escape keybindings 2020-08-17 18:22:57 +10:00
Jesse Duffield db826b3c87 add keybinding to create new branch off of commit
retain focus in commits panel

surface prompt errors

better description
2020-08-16 22:24:54 +10:00
Jesse Duffield 9b7a6934b3 more removing of g 2020-08-15 18:01:43 +10:00
Jesse Duffield 15229bbdab more removing of g and v 2020-08-15 18:01:43 +10:00
Jesse Duffield c44ee71ad4 update cheatsheet 2020-08-15 11:41:37 +10:00
Jesse Duffield 291a8e4de0 allow opening files on the selected line in the staging panel 2020-08-15 11:41:37 +10:00
Jesse Duffield 27cd12e2d9 accept umlaut keybindings 2020-08-12 20:07:56 +10:00
Jesse Duffield f4718a9047 allow editing commit files 2020-07-21 18:24:39 +10:00
Jesse Duffield 845c80721f Decouple escaping from quitting
When a user is not entering text into a prompt, the 'q' key should immediately
quit the application. On the other hand, the 'esc' key should cancel/close/go-back
to the previous context.

If we're at the surface level (nothing to cancel/close) and the user hits the
escape key, the default behaviour is to close the app, however we now have a
`quitOnTopLevelReturn` config key to override this.

I actually think from the beginning we should have made this config option
default to false rather than true which is the default this PR gives it,
but I don't want to anger too many people familiar with the existing behaviour.
2020-07-18 20:00:48 +10:00
Jesse Duffield 003e45d2f5 allow creating branches off of remote branches 2020-05-19 09:57:37 +10:00
Jesse Duffield 2974a57943 support copying stuff to clipboard 2020-04-15 10:44:56 +00:00
Jesse Duffield 40fbce91ce add new diff mode
WIP

WIP

WIP

WIP

WIP

WIP

WIP
2020-03-29 18:26:24 +11:00
Jesse Duffield 33d287d2f0 remove old diff mode code 2020-03-29 18:26:24 +11:00
Jesse Duffield a2790cfe8e rename to filtered mode 2020-03-29 11:37:29 +11:00
Jesse Duffield 624ae45ebb allow scoped mode where the commits/reflog/stash panels are scoped to a file
WIP

restrict certain actions in scoped mode

WIP
2020-03-29 11:37:29 +11:00
Jesse Duffield 52f41ab0d5 update cheatsheet 2020-03-28 03:16:44 +00:00
Jesse Duffield fbb767893e support lazyloading in commits view 2020-03-28 14:02:53 +11:00
Jesse Duffield 229f5ee48c add keybindings for paging in list panels and jumping to top/bottom 2020-03-28 14:02:53 +11:00
Jesse Duffield 83757f1065 limit size of menu panel 2020-03-26 21:44:33 +11:00
Jesse Duffield daecdd7c2b redoing 2020-03-25 09:39:04 +11:00
Jesse Duffield 137fd80fdb note that undo functionality is experimental 2020-03-25 09:39:04 +11:00
Jesse Duffield b1941c33f7 undo via rebase 2020-03-25 09:39:04 +11:00
Jesse Duffield 5d460e1e5e add tab keybindings 2020-03-23 23:25:00 +11:00
Jesse Duffield 8fbcc36331 allow resetting cherry picked commits selection 2020-03-19 21:42:21 +11:00
Jesse Duffield b0ec0821d5 fix docs 2020-03-18 22:50:35 +11:00
hitsuji_no_shippo 13a7806cac add opne menu keybindings in docs 2020-03-18 22:50:35 +11:00
hitsuji_no_shippo 41c76fb748 add close menu keybindings in docs 2020-03-18 22:50:35 +11:00
hitsuji_no_shippo ac0c3b9f92 fix search keybindings in docs 2020-03-18 22:50:35 +11:00
Jesse Duffield 1be0ff8da7 better upstream tracking and allow renaming a branch 2020-03-18 21:29:06 +11:00
hitsuji_no_shippo 2169b5109f add search keybings in docs 2020-03-11 19:43:22 +11:00
Jesse Duffield e47ad846c4 big golangci-lint cleanup 2020-03-09 12:23:13 +11:00
Jesse Duffield 79299be3b2 better keybindings for patch building mode 2020-02-29 18:48:10 +11:00
Jesse Duffield 4c9b620bd0 better keybindings for staging by line 2020-02-29 18:48:10 +11:00
Jesse Duffield a7508a5dfd fix cheatsheet script to support different contexts 2020-02-29 17:46:00 +11:00
Jesse Duffield fdb543fa7d add half and fullscreen modes 2020-02-25 08:45:30 +11:00
Jesse Duffield 1f5ccab1ce eagerload commits when searching 2020-02-24 22:18:04 +11:00
Jesse Duffield 46be280c92 support searching in side panels
For now we're just doing side panels, because it will take more work
to support this in the various main panel contexts
2020-02-24 22:18:04 +11:00
Jesse Duffield 2a5763a771 switch custom command keybinding to ':' 2020-02-24 22:04:39 +11:00
Jesse Duffield 0f0da9c32a fix wording 2020-02-16 09:57:49 +11:00
Jesse Duffield feaf98bd01 add reset to upstream option on files panel 2020-02-16 09:57:49 +11:00