summaryrefslogtreecommitdiffstats
path: root/pkg
AgeCommit message (Collapse)Author
2024-04-20pkg: fix some typosthirdkeyword
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
2024-04-18Remove ErrorMsgStefan Haller
There is no reason any more for application code to show error messages in a panel. Just return an error instead.
2024-04-18Rename Error() to ErrorHandler()Stefan Haller
It is now only used as the error handler that is passed to gocui.Gui on construction; it's not a client-facing API any more. Also, it doesn't have to handle gocui.ErrQuit, as gocui takes care of that.
2024-04-18Return error from RefreshOptions.ThenStefan Haller
2024-04-18Log errors from refresh instead of showing them in a panelStefan Haller
We are already doing this in other cases in this file.
2024-04-18Make OnWorker callback return an errorStefan Haller
This lets us get rid of a few more calls to Error(), and it simplifies things for clients of OnWorker: they can simply return an error from their callback like we do everywhere else.
2024-04-18Clean up error handling of WithWaitingStatus and WithWaitingStatusSyncStefan Haller
2024-04-18Remove calls to Error()Stefan Haller
Now that we have an error handler set, we can simply let them bubble up all the way to gocui.
2024-04-18Set ErrorHandlerStefan Haller
2024-04-18Bump gocuiStefan Haller
In Gui.onWorker we only make the minimum possible change to get things to compile after the API-breaking change of the gocui update; we'll make this cleaner later in this branch.
2024-04-16Remove PopupHandler index and mutexStefan Haller
It doesn't seem to be used.
2024-04-12Support both Sha and Hash on commits in custom commandsStefan Haller
We achieve this by wrapping the model Commit in a custom struct that provides both.
2024-04-12Add integration test that accesses commit properties in a custom commandStefan Haller
Useful as a regression test to check that the following commit doesn't break it.
2024-04-12improve korean translationShin-JaeHeon
2024-04-12rename sha to hash 10, last remaining sha (hopefully)pikomonde
2024-04-12rename sha to hash 9, case: Shapikomonde
2024-04-12rename sha to hash 8, update some log and commentpikomonde
2024-04-12rename sha to hash 7, language translatepikomonde
2024-04-12rename sha to hash 6, update short hashpikomonde
2024-04-12rename sha to hash 5pikomonde
2024-04-12rename sha to hash 4pikomonde
2024-04-12rename sha to hash 3pikomonde
2024-04-12rename sha to hash 2pikomonde
2024-04-12rename sha to hashpikomonde
2024-04-12renaming variable to CommitHashpikomonde
2024-04-12standardize 'Commit Sha' to 'Commit Hash'pikomonde
2024-04-10Dynamic copyright yearoakio
2024-04-10UserConfig validationoakio
2024-04-10Add StatusPanelView configoakio
2024-04-09Fix stderr redirectionEmanuele "Lele" Calo
Seems that there's a problem in the Stdout/Stderr/Stdin vars assignments, probably copy-paste issue.
2024-04-09TERM: remove TERM variable hard-coded value setEmanuele "Lele" Calo
2024-04-07Replace min/max helpers with built-in min/maxEng Zer Jun
We upgraded our minimum Go version to 1.21 in commit 57ac9c2189458a7f0e63c2e9cac8334694a3d545. 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-07pkg: fix some commenthongkuang
Signed-off-by: hongkuang <liurenhong@outlook.com>
2024-04-06Add `SpinnerConfig`Artem Belyakov
This new config section allows to customize frames and rate of thespinner
2024-03-30fixup! Introduce a yaml_utils.Walk functionStefan Haller
2024-03-29Remove our yaml forkStefan Haller
Switch back to the official go-yaml package.
2024-03-29Migrate null keybindings to "<disabled>"Stefan Haller
Unfortunately the migration code requires yaml v3, but our yaml fork is based on v2, so we need to import both in app_config.go in this commit, which is ugly. We can clean this up in the next commit.
2024-03-29Introduce a yaml_utils.Walk functionStefan Haller
2024-03-29Underline links in confirmation panelsStefan Haller
2024-03-29Make links clickable in confirmation panelsStefan Haller
This is not opt-in, we do it always. I can't imagine a situation where we wouldn't want it.
2024-03-29Make HandleGenericClick a little smarterStefan Haller
Make it recognize URLs wrapped in angle brackets, and followed by punktuation. We don't need this for the status panel, but we will need it for confirmation panels.
2024-03-29Extract a function HandleGenericClickStefan Haller
2024-03-29Cleanup: don't mess with globals in tests without resetting themStefan Haller
Changing globals in the init() function of a test file is a bad idea, as it affects all other tests that run after it. Do it explicitly in each test function that needs it, and take care of restoring the previous value afterwards.
2024-03-28Fix rewording signed commits when the log.showsignature git config is trueStefan Haller
For people who have the log.showsignature git config set to true, trying to reword a signed commit would put the signature verification into the subject field and the commit subject into the description field of the commit message panel. Amending commits, adding co-authors to a commit, and copying a commit message to the clipboard would all be broken in a similar way.
2024-03-28Fix the "Add to .git/info/exclude" command in submodules or worktreesStefan Haller
2024-03-28Add a test that demonstrates the problemStefan Haller
Using the "Add to .git/info/exclude" in a worktree results in an error message, as the test shows. The same would happen in a submodule, but I'm not adding an extra test for that, as the circumstances are the same.
2024-03-28Cleanup: simplify return statementsStefan Haller
2024-03-28Cleanup: remove pointless condition and error messageStefan Haller
The file .git/info/exclude can't possibly show up in the files panel.
2024-03-28Keep the same commit selected when exiting filtering modeStefan Haller
When exiting filtering mode, we currently keep the selection index the same in the commits panel. This doesn't make sense at all, since the index in the filtered view has no relation to the index in the unfiltered view. I often use filtering mode (either by path or by author) to find a given commit faster than I would otherwise be able to. When exiting filtering mode, it's useful to keep the same commit selected, so that I can look at the surrounding commits, see which branch it was a part of, etc. So reselect the commit again after exiting filtering mode. Sometimes this is not possible, most likely when the commit is so long ago that it's outside of the initial 300 range. In that case, at least select the commit again that was selected before I entered filtering; this is still better than arbitrarily keeping the same selection index.
2024-03-28Fix crash when filtering the keybindings menuStefan Haller
It would crash when some keybindings are set to null, and the filter string is such that only those keybindings remain visible. The reason for the crash is that when inserting non-model items (menu section headers in this case) you specify a column to align them to. This works on the assumption that the number of columns is always the same. It can cope with the case that columns are removed because they are empty for all items; but it can't cope with the case that the getDisplayStrings function returns a lower number of columns. And this is what happened here: MenuViewModel.GetDisplayStrings would omit the keybinding column when none of the entries have a keybinding. This logic is unnecessary, the generic list rendering mechanism takes care of this, so removing this logic fixes the crash. We do have to make sure though that the column is really empty when there's no keybinding, so change the logic to use FgCyan only when there's a keybinding.