Commit Graph
1654 Commits
Author SHA1 Message Date
stk b499eba1a8 Select next stageable line correctly after staging a range of lines
We already have this very convenient behavior of jumping to the next stageable
line after staging something. However, while this worked well for staging
single lines or hunks, it didn't work correctly when staging a range of lines;
in this case we want to start searching from the first line of the range.
2023-02-15 21:29:00 +01:00
stk ff2a799200 Make SelectedLine/SelectedLineIdx work in staging/stagingSecondary views
While we try to keep the view's cursor position in sync with the context state's
selectedLineIdx (at least when pressing up or down), there are enough situations
where the two run out of sync; for example when initially opening the view, or
after staging a hunk, or when scrolling the view using the wheel. While it would
be possible to fix these situations to keep them always in sync, it doesn't seem
worth it, because the view's cursor position isn't really used for anything
else. So we rather special-case the SelectedLine/SelectedLineIdx functions of
ViewDriver to query the context state's selectedLineIdx directly if it is a
patch explorer context.
2023-02-15 21:22:11 +01:00
Ryooooooga 39c20bc634 chore: change to work return-alt1 on all views 2023-02-11 21:19:47 +09:00
Jesse DuffieldandGitHub 823d95a8c6 Merge pull request #2418 from jesseduffield/feature/copy-remote-branch-to-clipboard 2023-02-11 10:53:31 +11:00
Jesse DuffieldandGitHub 225cd3cc60 Merge pull request #2412 from Ryooooooga/disable-help-on-suggestions 2023-02-11 10:52:49 +11:00
Ryooooooga 984eb95cb7 chore: remove UNKNOWN_VIEW_ERROR_MSG 2023-02-10 21:26:51 +09:00
Ryooooooga 1be6c522d8 fix: disable menu key binding while displaying popup 2023-02-09 20:13:41 +09:00
Luka Markušić 8af59c3e6e Copy remote branch name to clipboard 2023-02-09 11:56:12 +01:00
Jesse DuffieldandGitHub 4f7324bad0 Merge pull request #2413 from stefanhaller/allow-ignore-whitespace-everywhere 2023-02-09 21:55:12 +11:00
Jesse Duffield 5e2254395a fix linting issue 2023-02-09 21:45:14 +11:00
stk 5bb6198219 Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
stk bbaeab68e1 Better redrawing after toggling "ignore whitespace"
There's no need for refreshing anything; all that's needed is to re-focus the
selected list item. This way it will also work in other panels, which we are
about to add in the next commit.
2023-02-07 12:09:17 +01:00
stk d838965a41 Make "Toggle whitespace in diff view" a global key binding
Since it is going to affect a number of views later in the branch, it's easier
to make it global than to find all views that are affected.
2023-02-07 09:25:38 +01:00
Ryooooooga 7bd0c779c7 fix: fix default color to be white 2023-02-03 23:36:59 +09:00
Jesse DuffieldandGitHub c0e805718d Merge pull request #2358 from phanithinks/#2319_default_screen_mode 2023-02-01 21:52:09 +11:00
Jesse DuffieldandGitHub 368d6437b8 Merge pull request #2373 from phanithinks/clipboard_patch_option_2357 2023-01-31 17:02:46 +11:00
Phanindra Kumar PaladiandGitHub 01f0efb997 Merge branch 'master' into #2319_default_screen_mode 2023-01-29 10:25:14 +05:30
Phanindra kumar Paladi df58c75ca4 Fixed breaking integrtion tests(old) 2023-01-29 10:03:59 +05:30
stk 67fb28e2b8 Add user config gui.skipRewordInEditorWarning 2023-01-26 09:01:22 +01:00
stk b8d33b8f7b Extract helper function doRewordEditor
No behavior change, just a preparation for the next commit.
2023-01-22 15:59:32 +01:00
Phanindra kumar Paladi 946b8b5670 Fixed the lable in the custom_patch_options_panel.go 2023-01-18 21:13:31 +05:30
Phanindra kumar Paladi 265cdde7bc Fixed typo 2023-01-18 10:14:48 +05:30
Phanindra kumar Paladi e87fc4a229 Change key of clipboard copy 2023-01-18 05:50:47 +05:30
Phanindra kumar Paladi f6f82091bc Added copy to clipboard option to the patch options 2023-01-17 09:07:07 +05:30
Phanindra kumar Paladi a11e91e651 replaced 'screenMode' to 'windowSize' in config 2023-01-16 20:07:21 +05:30
Phanindra kumar Paladi f4ccb68464 Added screenMode configuration to gui configuration 2023-01-11 16:51:46 +05:30
Ryooooooga 00b922604a fix: fix goroutine leaks 2023-01-06 10:51:09 +09:00
Jesse Duffield 5c42e1a5dc defend against possible nil function 2022-12-30 22:49:08 +11:00
Ryooooooga cd9111837e feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
Ryooooooga 41222f07ed chore(gui): remove unused gitConfig 2022-12-30 20:01:14 +09:00
Jesse Duffield 1da0427e3a appease linter 2022-12-30 12:18:59 +11:00
Jesse Duffield af5b3be286 integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
Jesse DuffieldandGitHub f3fa9ec2d1 Merge pull request #2311 from wakaka6/add_return_alt1 2022-12-28 11:54:16 +11:00
Jesse Duffield ed93e0a2b0 remove dependency on model 2022-12-27 22:52:20 +11:00
Jesse DuffieldandGitHub fb15a2f4f8 Merge pull request #2326 from Ryooooooga/fix-scroll
fix https://github.com/jesseduffield/lazygit/issues/2309
2022-12-24 19:20:23 +11:00
Jesse Duffield fa97b0c76e move background code into its own file 2022-12-24 19:14:52 +11:00
Jesse Duffield 5c11b1ecb7 discard changes integration test 2022-12-24 19:05:46 +11:00
Jesse Duffield 57a1817deb don't kill long-running sandbox sessions 2022-12-21 22:51:39 +11:00
Ryooooooga 7bdba1abe4 fix(#2309): fix diff scroll 2022-12-20 22:25:49 +09:00
Jesse Duffield dde70486a1 apply user config changes in sandbox mode 2022-12-20 23:07:43 +11:00
Jesse DuffieldandGitHub 5679efe174 Merge pull request #2239 from bdach/u2f-key-prompts
close https://github.com/jesseduffield/lazygit/issues/2230
2022-12-20 21:44:29 +11:00
wakaka6 6386a03805 add return alt1 2022-12-11 15:44:25 +08:00
Arnaud PERALTAandJesse Duffield 0af63daf18 workingtree controller fixed with new references for commit in staged menu 2022-12-01 09:12:18 +11:00
Arnaud PERALTAandJesse Duffield 8b894d7bf5 wip: commit logic in helper and reported in files/staging controllers 2022-12-01 09:12:18 +11:00
Jesse Duffield 65d6d7fb2d fix ignore file keybinding 2022-11-30 19:36:35 +11:00
Bartłomiej DachandJesse Duffield 1a1f042f49 Add credential prompts for U2F-backed SSH keys
The 8.2 release of OpenSSH added support for FIDO/U2F hardware
authenticators, which manifests in being able to create new types of SSH
key, named `ecdsa-sk` nad `ed25519-sk`. This is relevant to lazygit,
as those SSH keys can be used to authorise git operations over SSH, as
well as signing git commits. Actual code changes are required for
correct support, as the authentication process for these types of keys
is different than the process for types supported previously.

When an operation requiring credentials is initialised with a U2F
authenticator-backed key, the first prompt is:

	Enter PIN for ${key_type} key ${path_to_key}:

at which point the user is supposed to enter a numeric (and secret) PIN,
specific to the particular FIDO/U2F authenticator using which the SSH
keypair was generated. Upon entering the correct key, the user is
supposed to physically interact with the authenticator to confirm
presence. Sometimes this is accompanied by the following text prompt:

	Confirm user presence for key ${key_type} ${key_fingerprint}

This second prompt does not always occur and it is presumed that the
user will know to perform this step even if not prompted specifically.
At this stage some authenticator devices may also begin to blink a LED
to indicate that they're waiting for input.

To facilitate lazygit's interoperability with these types of keys, add
support for the first PIN prompt, which allows "fetch", "pull", and
"push" git operations to complete.
2022-11-30 13:34:32 +11:00
Luka Markušić b3d086bdc1 Resolve the prompt just before using it
In case a later command depends on a prompt input from a previous one we
need to evaluate it only after the previous prompt has been confirmed.
2022-11-25 22:46:36 +01:00
Jesse DuffieldandGitHub de22238589 Merge pull request #2224 from Ryooooooga/ambiguous-branch 2022-11-14 19:09:37 +11:00
RyoooooogaandJesse Duffield 52a2e4c1dc fix: fix ambiguous branch name
test: add an integration test for checkout branch by name

fix: fix full ref name of detached head

refactor: refactor current branch loader

chore: use field name explicitly
2022-11-14 19:05:07 +11:00
Jesse DuffieldandGitHub e953659ebf Merge pull request #2273 from artvi/fix/show_loading_state_when_bottomline_disabled 2022-11-14 19:01:26 +11:00