1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-04-24 20:56:17 +02:00
Commit Graph

134 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 97daec7228 Add test demonstrating selection bug when staging a range of lines
The selected line is not in the right position after staging a range of lines;
see next commit.
2023-02-15 21:28:05 +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
Jesse Duffield ae07cf5506 migrate discard old file change test 2022-12-28 13:01:32 +11:00
Jesse Duffield 9fef4447b6 move popup assertions into a struct 2022-12-28 11:00:22 +11:00
Jesse Duffield ed93e0a2b0 remove dependency on model 2022-12-27 22:52:20 +11:00
Jesse Duffield c5050ecabd move shell into test driver 2022-12-27 21:47:37 +11:00
Jesse Duffield 78b495f50a rename input to t 2022-12-27 21:35:36 +11:00
Jesse Duffield 53e06b71ae add tap function 2022-12-27 21:26:18 +11:00
Jesse Duffield b166b8f776 combine assert and input structs, clean up interface 2022-12-27 21:26:18 +11:00
Jesse Duffield 09e80e5f2a better namespacing for assertions 2022-12-27 21:26:18 +11:00
Jesse Duffield be30cbb375 add view asserter getter struct 2022-12-27 21:26:18 +11:00
Jesse Duffield b64f55518b refactor commit message stuff in integration tests 2022-12-27 21:26:18 +11:00
Jesse Duffield 8052ac4fd6 add prompt asserter 2022-12-27 21:26:18 +11:00
Jesse Duffield c976839a63 refactor prompt handling in integration tests 2022-12-27 21:26:17 +11:00
Jesse Duffield 09db4c4397 allow checking if line is selected in Lines and TopLines methods 2022-12-26 17:45:10 +11:00
Jesse Duffield 96310288ee allow chaining matchers 2022-12-26 17:15:33 +11:00
Jesse Duffield c841ba8237 add switch-to-view methods 2022-12-26 16:49:54 +11:00
Jesse Duffield 9a6f21ce42 cleaner test assertions 2022-12-26 12:20:13 +11:00
Jesse Duffield fa0414777f rename SelectedLine to CurrentLine in tests 2022-12-26 10:42:19 +11:00
Jesse Duffield 5d2584a188 introduce ViewLines functions 2022-12-25 11:38:00 +11:00
Jesse Duffield b623ecf898 add helper functions for popups in tests 2022-12-24 19:15:59 +11:00
Jesse Duffield aedfce2845 refactor to not have Match at the start of assert method names, because it reads better that way 2022-12-24 19:14:52 +11:00
Jesse Duffield bc4ace8357 add commit revert integration test 2022-12-20 22:45:02 +11:00
Jesse Duffield b40190bd94 add multi-line commit integration test 2022-12-20 22:45:02 +11:00
Arnaud PERALTA 50b0d85cd3 integration tests for commit without pre-commit hooks in staging files menu 2022-12-01 09:12:18 +11:00
Arnaud PERALTA bfcbf228bf commit integrations test with window name's assertion 2022-12-01 09:12:18 +11:00
Arnaud PERALTA 87e0f6b92d integration tests for commit in staged files and unstaged files menus 2022-12-01 09:12:18 +11:00
Jesse Duffield b2ae651686 add slow flag to integration tests 2022-08-14 20:49:20 +10:00
Jesse Duffield 53979f7cec a more complex custom command test 2022-08-14 20:49:20 +10:00
Jesse Duffield b8d9443999 rename helpers to components 2022-08-13 13:55:17 +10:00
Jesse Duffield 610eddfe05 fix CI 2022-08-13 13:55:09 +10:00
Jesse Duffield a45b22e12f re-name Input and improve documentation 2022-08-13 13:55:08 +10:00
Jesse Duffield ba96baee32 move code from main into app package to allow test to be injected 2022-08-13 13:55:08 +10:00