1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-10 11:10:18 +02:00
Commit Graph

4660 Commits

Author SHA1 Message Date
Cristian Betivu
ee308a4994 Clean before convertion? 2023-08-19 18:36:57 +03:00
Cristian Betivu
a2b2336173 Stylistic changes 2023-08-19 18:36:57 +03:00
Cristian Betivu
d7b1deb465 Clean path 2023-08-19 18:36:57 +03:00
Cristian Betivu
dd01639f57 Improve error message 2023-08-19 18:36:57 +03:00
Stefan Haller
525932fbf2
Fix sha colors when rebasing (#2946) 2023-08-19 12:38:00 +02:00
Stefan Haller
b1314349d7 Fix yellow/red coloring while rebasing
It determines the yellow/red status by getting the merge-base between the
current branch and its upstream; while we're rebasing, the current branch is
HEAD, so it tried to get the merge-base between HEAD and HEAD{u}, which doesn't
work. Fix this by passing the name of the checked-out branch separately.
2023-08-19 09:26:27 +02:00
Stefan Haller
9671f549a1 Fix the blue sha color of todo commits while rebasing
This broke with 5d8a85f7e7.
2023-08-19 09:24:00 +02:00
Jesse Duffield
689deb72bd
Add emacs-keybinds for word navigation (#2935) 2023-08-17 09:41:14 +10:00
Ching Pei Yang
84372cfad9 Add emacs-keybinds for word navigation 2023-08-15 12:22:17 +02:00
README-bot
e429415ed4 Updated README.md 2023-08-15 09:49:34 +00:00
Stefan Haller
7402be98b6
Jump to middle of the view when selection leaves the visible area (#2915) 2023-08-15 11:49:20 +02:00
Stefan Haller
341b9725d4 Add ScrollOffMargin user config
When set to a non-zero value, views will scroll when the selection gets this
close to the top or bottom of the view.
2023-08-15 11:40:40 +02:00
Stefan Haller
8f164f7bc5 Stop cycling hunks when reaching the end
Previously, when pressing right-arrow when the cursor is already in the last
hunk, it would jump back to the beginning of that hunk. This can be confusing if
the hunk is long, maybe the start of the hunk is already scrolled off the top of
the window, and then pressing right-arrow actually scrolls *backwards*, which is
counter-intuitive. It's better to do nothing in this case.

Same for left-arrow when the cursor is already in the first hunk, although here
the problem is not so severe (unless diff context was increased by a huge
amount, and the start of the first hunk is scrolled off the bottom of the
window).
2023-08-15 11:40:40 +02:00
Stefan Haller
79c11a0458 If selected line is outside, move it to the middle of the view
Previously, the current line was only moved as much as necessary so that it's in
view again. This had the problem that when jumping downwards from hunk to hunk
with the right-arrow key, only the first line of the new hunk was shown at the
bottom of the window. I prefer to put the selected line in the middle of the
view in this case, so that I can see more of the newly selected hunk.

This has the consequence that when scrolling through the view line by line using
down-arrow, the view jumps by half a screen whenever I reach the bottom. I can
see how some users might be opposed to this change, but I happen to like it too,
because it allows me to see more context of what's ahead.
2023-08-15 11:40:40 +02:00
Stefan Haller
4a4afc4639 Fix typo in comment 2023-08-15 11:40:40 +02:00
Stefan Haller
ebdfd8046a Bump gocui 2023-08-15 11:40:40 +02:00
Jesse Duffield
d99e983236
Add compare-commits demo (#2929) 2023-08-12 17:32:15 +10:00
Jesse Duffield
1c6cfafba7 Add features to table of contents 2023-08-12 17:27:25 +10:00
Jesse Duffield
83d642b74f Add demo for diffing two commits 2023-08-12 17:24:05 +10:00
Jesse Duffield
b1bc437d1b Factor out common config setup functions in demo package 2023-08-12 16:52:40 +10:00
Jesse Duffield
26989ce0ee
Show commit mark before showing extra info (#2928) 2023-08-12 16:44:27 +10:00
Jesse Duffield
e6356ce10c Show commit mark before showing extra info
The 'YOU ARE HERE' marking should be shown before we show things like the current tag, otherwise it could be missed
2023-08-12 16:34:04 +10:00
README-bot
b92da0dc54 Updated README.md 2023-08-12 06:19:15 +00:00
Jesse Duffield
70e668bfcf
Add more demos (#2927) 2023-08-12 16:18:59 +10:00
Jesse Duffield
8dd517870d Add commit graph demo 2023-08-12 16:16:03 +10:00
Jesse Duffield
f1753f36c8 Add rebase from marked base commit test
This also fixes a bug where after the rebase each commit in the commits view had a tick against it because we hadn't
refreshed the view since the base commit was no longer marked
2023-08-12 16:16:03 +10:00
Jesse Duffield
3ea81d4a6f Add undo demo 2023-08-12 16:15:50 +10:00
Federico
0df5cb1286
Allow deleting remote tags/branches from local tag/branch views (#2738) 2023-08-10 17:39:26 +10:00
Jesse Duffield
c43830b027
Support editing files in existing neovim instance (#2916) 2023-08-10 17:23:58 +10:00
Stefan Haller
08624b8ef7
Fix jumping to the correct line from the staging view (#2919) 2023-08-10 07:27:11 +02:00
Stefan Haller
73b68927af Fix bug in LineNumberOfLine
This fixes a regression that was introduced in 73c7dc9c5d.
2023-08-10 07:22:42 +02:00
Stefan Haller
bf699d3a79 Add test case for LineNumberOfLine()
There's a bug in LineNumberOfLine, but the existing test coverage doesn't catch
it, as the only test case for this was one where oldStart and newStart were the
same for all hunks. Add a test case where newStart is different for one of the
hunks; this demonstrates a bug, where all expected results from index 12 on are
off by one.
2023-08-10 07:22:42 +02:00
README-bot
f2e8d549ba Updated README.md 2023-08-09 22:36:48 +00:00
Jesse Duffield
4ffb6c0fea
Show dialogue when attempting to open info link fails (#2899) 2023-08-10 08:36:32 +10:00
Simon Whitaker
54776052a1 If OpenLink errors, show a dialog instead
If the command used by OSCommand.OpenLink fails, lazygit crashes. With this change, if the OpenLink command fails, lazygit just shows a dialog inviting the user to visit the relevant URL.

Fixes #2882
2023-08-09 13:12:40 +01:00
Jesse Duffield
9c5eedf748 use 'suspend' instead of 'editInTerminal' internally
'suspend' is a more appropriate name, especially now that you can choose not to suspend despite
still being in a terminal
2023-08-09 22:03:58 +10:00
Jesse Duffield
ca08956f77 Use soft wrapping in config doc
Looking online I can't find any consensus about whether soft or hard wrap is better.
This post goes into the pros/cons: https://martin-ueding.de/posts/hard-vs-soft-line-wrap/

I find that editing hard-wrapped text is a pain in the ass, and it's hard to enforce
consistency. So I'm switching to soft-wrapping for this doc.
2023-08-09 21:33:12 +10:00
Jesse Duffield
aa74239f05 Add nvim-remote editor preset
This allows us to jump back to the parent neovim process when we want to edit a file, rather than opening a new neovim
process within lazygit.

Arguably this should be the default, but I'm not familiar with the various ways people use lazygit with neovim.
2023-08-09 21:32:53 +10:00
Jesse Duffield
9e7018db8a Honour editInTerminal value when opening a worktree folder
There was no good reason not to do this in the first place.
2023-08-09 21:00:27 +10:00
Jesse Duffield
cdea5b4873
Fix issue where explosion effect was out-of-view (#2909) 2023-08-08 23:07:46 +10:00
Jesse Duffield
4b0432423d Reset origin when clearing view 2023-08-08 22:01:43 +10:00
Jesse Duffield
2607580a09
Add Click() to GuiDriver (#2898) 2023-08-08 17:05:32 +10:00
Jesse Duffield
ebd56bd8d5
Mention JSON schema (#2893) 2023-08-08 08:19:05 +10:00
Simon Whitaker
ed1547e0cb Add a Click() primitive to the integration test library 2023-08-07 15:10:28 +01:00
README-bot
5e388e21c8 Updated README.md 2023-08-07 14:03:45 +00:00
Jesse Duffield
4c89f9fba5
Fix seg-fault when opening submodule in nested folder (#2903) 2023-08-08 00:03:28 +10:00
Jesse Duffield
8e7958f78b Fix seg-fault when opening submodule in nested folder 2023-08-07 23:57:28 +10:00
Jesse Duffield
579791e7bc
Fix opening lazygit in a bare repo with specified worktree (#2902) 2023-08-07 22:48:14 +10:00
Jesse Duffield
595e28d335 Support bare worktrees where worktree does not have its own .git file
This was on oversight on my part: I assumed that the --work-tree arg was
always intended for use with linked worktrees which have a .git file
pointing back to the repo.

I'm honestly confused now: seems like there are three kinds of worktrees:
* the main worktree of a non-bare repo
* a linked worktree (with its own gitdir in the repo's worktrees/ dir)
* a random folder which you specify as a worktree with the --work-tree arg

I'm pretty sure the --work-tree arg is only intended to be used with this
third kind or workree
2023-08-07 22:40:53 +10:00
Jesse Duffield
0551f29de9 Test bare repos with dotfile setup 2023-08-07 22:21:23 +10:00