1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
b37d6dcd1c When using the panel jump keys and the target panel is already active, switch tabs 2024-08-17 10:37:00 +02:00
b9107d5fc8 Support setting the similarity threshold for detecting renames 2024-07-13 14:24:26 +10:00
bb01648521 Remove redundant calls to resize editable panels at creating time
The only purpose of this was to scroll the editable text correctly (see
https://github.com/jesseduffield/lazygit/pull/2146); now that gocui takes care
of that, we no longer need to do this.
2024-06-28 08:14:07 +02:00
cf27fd827b Clear keybinding functions in resetHelpersAndControllers
When switching to a repo that was open before, the context tree is reused, so
before adding keybinding functions to those contexts again, we need to clear the
old ones.
2024-06-23 12:28:42 +02:00
379a6f1922 Save and restore the unwrapped description
When preserving the commit message (when cancelling a commit), and later
restoring it, use the unwrapped description.
2024-03-09 10:00:44 +01:00
7bddf53223 Improve keybinding descriptions
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels).

It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen),
and so due in part to laziness it shortens some descriptions so that we don't need to manage both
a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription
field for when we do want to have both a short and long description.

You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions,
because I could get away with it.
2024-01-28 08:12:01 +11:00
798225d9e1 Move file discard action into files controller
It's better just having all the keybindings in one file especially when you want to
share code
2024-01-24 20:51:00 +11:00
8ca78412ac Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
0fd4983c66 Fall back to WithWaitingStatus if view showing the item is not visible 2023-12-10 15:57:51 +01:00
79fe885dcd Add WithWaitingStatusSync 2023-12-09 15:28:40 +01:00
b5ca6a3add When refreshing models, re-apply active filter for the corresponding view 2023-10-10 08:37:30 +02:00
7075b66bc6 Add WithInlineStatus helper function
Very similar to WithWaitingStatus, except that the status is shown in a view
next to the affected item, rather than in the status bar.

Not used by anything yet; again, committing separately to get smaller commits.
2023-10-08 18:45:36 +02:00
e8fac6ca73 Extract a SubCommitsHelper from SwitchToSubCommitsController
We want to use it from BranchesController too.
2023-08-29 08:16:40 +02:00
0df5cb1286 Allow deleting remote tags/branches from local tag/branch views (#2738) 2023-08-10 17:39:26 +10:00
92f0aa23cc Remove file watcher code
Now that we refresh upon focus, we can scrap this file watching code.
Stefan says few git UIs use file watching, and I understand why: the
reason this code was problematic in the first place is that watching
files is expensive and if you have too many open file handles that
can cause problems.

Importantly: this code that's being removed was _already_ dead.
2023-08-02 21:50:44 +10:00
cdfad864ae Remove worktree version guards
Our min required git version is 2.20 so there's no need to add guards
for worktrees because they were added in 2.5
2023-07-30 18:35:23 +10:00
3cd2d6fa5c Hide worktree functionality on old git versions 2023-07-30 18:35:22 +10:00
2e68967e02 Show base ref suggestions when creating worktree 2023-07-30 18:35:22 +10:00
9c69a5df69 Checkout worktree when creating from worktree view 2023-07-30 18:35:22 +10:00
18ea68c23a Support creating worktrees from refs 2023-07-30 18:35:22 +10:00
077ae99438 Prompt to switch to worktree when branch is checked out by other worktree 2023-07-30 18:35:22 +10:00
60872c91e6 Update status to differentiate the main vs linked worktrees 2023-07-30 18:35:21 +10:00
f8ba899b87 Initial addition of support for worktrees 2023-07-30 18:35:21 +10:00
7807b40322 Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message
prompt.

I've had to update other uses of that prompt to allow the summary and description labels to
be passed in
2023-07-22 14:36:35 +10:00
a9e2c8129f Introduce filtered list view model
We're going to start supporting filtering of list views
2023-07-03 12:54:13 +10:00
9d68b287db Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 13:19:53 +10:00
a5c72d056d ensure initial context is set when entering submodule 2023-04-30 13:19:53 +10:00
f2c85c5b19 move side window actions to controllers package 2023-04-30 13:19:53 +10:00
f8c9ce33c2 move more actions into controller 2023-04-30 13:19:53 +10:00
4a33fede7b move window arrangement helper 2023-04-30 13:19:53 +10:00
db12853bbe lots of changes 2023-04-30 13:19:53 +10:00
711674f6cd standardise controller helper methods 2023-04-30 13:19:53 +10:00
fc91ef6a59 standardise helper args 2023-04-30 13:19:53 +10:00
43251e7275 split context common from helper common 2023-04-30 13:19:53 +10:00
0c6ab4b43e refactor cherry pick code to move state access out of helper 2023-04-30 13:19:53 +10:00
509e3efa70 lots more refactoring 2023-04-30 13:19:53 +10:00
8edad826ca Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
85fdb700ba Extract amendHead function into new AmendHelper 2023-04-01 08:16:15 +02:00
4780953cef Merge pull request #2377 from shinhs0506/clear-staging-after-commit 2023-03-24 19:13:00 +11:00
776d8f4d2e refresh the staging panel on successful commit
apply formatting
2023-03-20 20:13:59 +11:00
a624e0457f feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
af5b3be286 integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
7bdba1abe4 fix(#2309): fix diff scroll 2022-12-20 22:25:49 +09:00
0af63daf18 workingtree controller fixed with new references for commit in staged menu 2022-12-01 09:12:18 +11:00
7410acd1aa move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
445a625b56 rename merging context to mergeConflicts 2022-08-06 18:05:00 +10:00
524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
7077ea428f add optimistic rendering for staging and unstaging files 2022-07-31 14:34:57 +10:00
f83308c8df Add option to (un)set upstream for a local branch 2022-04-11 14:04:06 +02:00
0dfb7c08b7 remove controllers struct 2022-03-27 18:16:16 +11:00