1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-04-28 21:14:37 +02:00
Commit Graph

64 Commits

Author SHA1 Message Date
Eng Zer Jun f933a2f7ec Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.

Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-04-07 23:24:10 +08:00
Artem Belyakov f3dba743f0 Add SpinnerConfig
This new config section allows to customize frames and rate of
thespinner
2024-04-06 13:46:15 +02:00
Stefan Haller f226a277bf Rename MinMax to SortRange 2024-01-26 11:18:06 +01:00
Jesse Duffield 24a4302c52 Add range selection ability on list contexts
This adds range select ability in two ways:
1) Sticky: like what we already have with the staging view i.e. press v then use arrow keys
2) Non-sticky: where you just use shift+up/down to expand the range

The state machine works like this:
(no range, press 'v') -> sticky range
(no range, press arrow) -> no range
(no range, press shift+arrow) -> nonsticky range
(sticky range, press 'v') -> no range
(sticky range, press arrow) -> sticky range
(sticky range, press shift+arrow) -> nonsticky range
(nonsticky range, press 'v') -> no range
(nonsticky range, press arrow) -> no range
(nonsticky range, press shift+arrow) -> nonsticky range
2024-01-19 10:47:21 +11:00
Stefan Haller 23befdd13a Pass "now" into utils.Loader
This makes it possible to write deterministic tests for views that use it.
2023-10-16 09:03:07 +02:00
Stefan Haller cdad0b998e Add constant for LoaderAnimationInterval
Since Loader and renderAppStatus need to agree on it, it helps for it to be a
constant in case we want to change it.
2023-09-20 13:30:49 +02:00
Jesse Duffield b73efb2c22 Better logic for knowing which repo we're in 2023-07-30 18:35:22 +10:00
Gustavo Andrioli 39e84e13f4 Use lazycore utils: Clamp and GetLazyRootDirectory 2022-10-15 13:55:44 -03:00
Jesse Duffield 5173d7f5e1 better CLI interface 2022-08-14 17:20:52 +10:00
Jesse Duffield 77881a9c7d add new integration test pattern 2022-08-11 21:24:15 +10:00
Jesse Duffield 524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
Jesse Duffield c084abb378 move more view model logic into the files view model 2022-03-17 19:13:40 +11:00
Jesse Duffield 9989c96321 better formatting 2021-10-31 22:33:39 +11:00
Jesse Duffield f91892b8f1 fix truncation 2021-10-30 20:19:40 +11:00
Jesse Duffield fb395bca6e support reverting merge commits 2021-06-05 22:15:51 +10:00
Jesse Duffield 258eedb38c refactor 2021-06-02 20:33:52 +10:00
Jesse Duffield fbab5bd444 do not refresh patch panel unless commit files panel is the current side panel 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 0b42437052 fix comment 2021-04-06 19:34:32 +10:00
Jesse Duffield ecc5fe24a9 get tcell to cleanup the terminal if we panic 2021-04-06 19:34:32 +10:00
Jesse Duffield 1149dea4b2 stop referencing termbox 2021-04-06 19:34:32 +10:00
Dawid Dziurla 327b6ad097 utils: ReplaceAll -> Replace
Fix compatibility with older Go compiler versions
2020-10-13 17:25:37 +02:00
Jesse Duffield 79e59d5460 add some safe goroutines
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield 37bb89dac3 type i18n 2020-10-10 00:23:01 +11:00
Jesse Duffield d4ab607d0d allow adding a submodule 2020-10-02 08:09:42 +10:00
Jesse Duffield 826d1660c9 move patch stuff into its own package 2020-08-15 11:41:37 +10:00
Jesse Duffield 660cc2f3d1 follow cursor when staging and unstaging a file rename 2020-08-07 18:59:56 +10: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 d105e2690a vastly improve the logic for undo and redo 2020-03-25 09:39:04 +11:00
Jesse Duffield f94d0be2c9 refactor the way we render lists 2020-02-25 21:21:07 +11:00
Jesse Duffield 9fd9fd6816 better commit lines in fullscreen mode 2020-02-25 21:21:07 +11:00
Jesse Duffield fdb543fa7d add half and fullscreen modes 2020-02-25 08:45:30 +11:00
Jesse Duffield 2e1344f611 fix specs 2020-02-15 08:47:36 +11:00
Jesse Duffield 814a0ea36f begin refactor of menu panel 2020-02-15 08:47:36 +11:00
Jesse Duffield 92e43d9e77 allow changing tabs with [ and ] 2019-11-21 22:07:14 +11:00
Jesse Duffield d5e443e8e3 Support building and moving patches
WIP
2019-11-05 19:22:01 +11:00
Jesse Duffield a3c84296bf use array of ints instead of range 2019-11-05 19:22:01 +11:00
Jesse Duffield 820f3d5cbb support split view in staging panel and staging ranges 2019-11-05 19:22:01 +11:00
Jesse Duffield 53cded77f1 fix padding with coloures strings 2019-05-19 15:25:33 +10:00
Jesse Duffield Duffield 8c0ea8f45f mouse support 2019-03-02 17:49:30 +11:00
Jesse Duffield Duffield 639df512f3 decolorise strings before calculating padwidths 2019-02-24 17:05:17 +11:00
Jesse Duffield ad93b4c863 consider whether the view has focus when rendering the contents of a view 2019-02-16 15:17:44 +11:00
Jesse Duffield cfe3605e6b use go-errors package to display stacktrace of errors that cause panics 2019-02-11 22:39:17 +11:00
Jesse Duffield 99a8b1ae8b making a start on unidirectional data binding to fix these UI bugs 2018-12-08 11:51:47 +11:00
Jesse Duffield c0f9795910 staging lines and hunks 2018-12-05 19:33:46 +11:00
Jesse Duffield b9708c9f88 fix issues with commit message panel losing focus 2018-09-19 20:36:40 +10:00
Jesse Duffield 950cfeff6f add specs for menu utils 2018-09-19 18:19:26 +10:00
Jesse Duffield a66ac8092e minor refactor 2018-09-17 21:27:53 +10:00
Jesse Duffield c00c834b35 standardise rendering of lists in panels 2018-09-17 21:02:30 +10:00
Jesse Duffield 52b132fe01 better handling of cursor and origin positionings 2018-09-10 20:17:39 +10:00