Commit graph

344 commits

Author SHA1 Message Date
Stephan Dilly
1cd74ad02e fix messing up users terminal after opening file in vi (related to #173) 2020-07-07 12:53:17 +02:00
Jon Grythe Stødle
52f31adb98 Add command to edit selected file in editor
Pressing `e` while looking at a file in the _Status_ view will launch an external editor with the current file opened. The editor chosen is determined by the default logic introduced in #114.

An improvement to this in the future could be launching at the specific line at which the _Diff_ view is focused, but that seems to require a change in `FileDiff` which is a change bigger than this PR.

Fixes #166
2020-07-07 12:42:01 +02:00
Stephan Dilly
b9ec27d89c fix newline visualization in commit msg editor (closes #169) 2020-07-07 12:33:32 +02:00
Stephan Dilly
8c5b2b3774 switch deprecated transitive dependency net2->socket2 - crossterm update (closes #66) 2020-07-06 21:18:14 +02:00
Stephan Dilly
de7f48f88e show placeholder popup when waiting for external editor #157 2020-07-04 20:22:55 +02:00
Stephan Dilly
a33db8d3de cache branchname lookup (closes #159) 2020-07-04 18:12:54 +02:00
Stephan Dilly
715c1794d6 fix clippy for when pprof is off 2020-07-04 16:54:30 +02:00
Stephan Dilly
8f1a1a008a fix windows pprof build 2020-07-04 16:24:51 +02:00
Stephan Dilly
bfda870933 fix panic when cursor is OOB after closing editor with shorter msg 2020-07-04 15:44:24 +02:00
Stephan Dilly
756c124b68 hide cursor again after external editor closes (fixes #168) 2020-07-04 15:40:52 +02:00
Stephan Dilly
313f5586b0 todo 2020-07-04 15:38:46 +02:00
Stephan Dilly
60759d7bec open external editor from commit popup
this puts all commit logic into one 'view' and allows editing amend commit messages in the external editor aswell.
2020-07-04 15:36:12 +02:00
Stephan Dilly
0a24c2c9b0 add profiling feature 2020-07-04 14:59:30 +02:00
Stephan Dilly
b782472a63 more fancy spinner, cleanup tabs 2020-07-04 12:55:40 +02:00
Stephan Dilly
c784c9e9b3 safety first 2020-06-30 09:49:27 +02:00
Agung Baptiso Sorlawan
3ec47ced67
Fix scrolling issues in staged/unstaged section (fixes #144) (#162) 2020-06-30 09:45:18 +02:00
Stephan Dilly
923bed9abf use condvar/mutex to not busywait when suspending input polling (closes #153) 2020-06-30 09:33:22 +02:00
Stephan Dilly
a4de701415 move input into app so start/stop polling is less awkward 2020-06-29 20:00:47 +02:00
Stephan Dilly
b54e90a0de simplify spinner and mainloop to reduce log noise (#156) 2020-06-29 18:29:37 +02:00
Stephan
4a442f3829 cleanup use 2020-06-29 12:30:10 +02:00
Stephan
ce4f3af767 leave alternate screen when going into external editor (fixes #152) 2020-06-29 10:27:16 +02:00
Stephan Dilly
c856c23aef remove outdated commit method 2020-06-29 09:46:38 +02:00
Jon Grythe Stødle
477fdd303d Add support for external editor
Adds support for editing commit messages in an external editor. It read the GIT_EDITOR, VISUAL, EDITOR environment variables in turn (in the same order git does natively) and tries to launch the specified editor. If no editor is found, it falls back to "vi" (same as git). If vi is not available, it will fail with a message.
2020-06-26 00:50:39 +02:00
Stephan Dilly
8627d940f4 steamline some more command functions 2020-06-25 19:05:59 +02:00
Stephan Dilly
df338334e1 2% optimisation in revlog where amend was still run on each event 2020-06-25 18:35:16 +02:00
Stephan Dilly
895c013d10 fixed author column width (closes #148) 2020-06-25 10:27:07 +02:00
Stephan Dilly
0d84abd1c6 make draw take shared ref again 2020-06-23 11:03:02 +02:00
Stephan Dilly
19947a7ec0 fix state change bug introduced in last commit 2020-06-23 00:24:12 +02:00
Stephan Dilly
cb6fe05cd6 indicate whether input polling state in process of changing 2020-06-23 00:18:59 +02:00
Stephan Dilly
a98dea7825 clippy fix 2020-06-22 20:12:19 +02:00
Stephan Dilly
76e52cc7a2 show file size diff for binary files (#141) 2020-06-22 20:01:04 +02:00
Stephan Dilly
b8397ae285 make help headers more obvious (closes #131) 2020-06-22 16:42:16 +02:00
Stephan Dilly
afa6aad973 cleanup 2020-06-22 16:36:54 +02:00
Stephan Dilly
6199706a2f remove one indirection 2020-06-22 12:40:54 +02:00
Stephan Dilly
86fafbd47b clippy fixes 2020-06-22 12:32:01 +02:00
Stephan Dilly
b899751c2b share theme instead of copying it all over the place 2020-06-22 12:21:21 +02:00
Stephan Dilly
79b8bdfae2 rename 2020-06-22 09:36:56 +02:00
Stephan Dilly
4bcfa61087 allow input polling to be paused (#114) 2020-06-22 09:13:37 +02:00
Daniel Obermaier
9dcc445ab9 simple fix for arrow utf8 encoding in help window 2020-06-19 13:16:23 +02:00
Stephan Dilly
b4400dfe13 Use terminal blue as default selection background (closes #129) 2020-06-16 16:46:46 +02:00
Stephan Dilly
19db19b010 add test for untracked files in stash bug (#130) 2020-06-15 23:40:09 +02:00
Stephan Dilly
f119595128 fix clippy 2020-06-15 12:30:44 +02:00
Stephan Dilly
b4a466876e Fix textinput cursor was not reset after msg.clear 2020-06-15 12:09:22 +02:00
Stephan Dilly
c6eb066953 cache config path call 2020-06-15 02:22:10 +02:00
Jon Grythe Stødle
212ce86f49 Move config directory
This changes the config directory from the `dirs::cache_dir` to `dirs::config_dir`. It does however keep the cache directory as the default logging directory, as it seems a better fit.

It also adds a function, `migrate_config`, which is called at startup to move directory entries inside the "old" config directory to the "new" one (but it skips moving log files). The intention is that this function can be removed after a few releases when the likelihood of someone upgrading from 0.6.0 or earlier is fairly small.

Fixes #98
2020-06-15 01:36:13 +02:00
Stephan Dilly
602257f114 simplification and fix staging hunks in untracked file 2020-06-15 01:32:39 +02:00
Stephan Dilly
b3045b35bb rename 2020-06-14 23:37:46 +02:00
Stephan Dilly
d67a240bc7 fix reset hunk in untracked file 2020-06-14 23:34:54 +02:00
Stephan Dilly
24da2f200e
Reset individual hunks (#125)
closes #11
2020-06-14 10:46:25 +02:00
Stephan Dilly
0cdaabf9f8 clippy fix 2020-06-14 10:20:05 +02:00