Closed TheLostLambda closed 4 months ago
This sounds reasonable! I realized things may become complicated, as you don't want to make the cursor move unexpectedly after e.g. a Pull.
I guess Fetch and Push are easier?
I agree there would have to be some thinking about where to place the cursor post-pull, but how is that currently done with reloading after pressing g
?
I might still find it less jarring to have the cursor / view change post pull (it does when I press g
already) than to have it hang during a pull, but perhaps I'm just not 100% understanding what you mean (I'm sure there is more nuance on the code-side)!
There's two aspects I think.
edit: I do agree this is a good idea, perhaps it is a non-issue. And it can be made clear by showing some kind of status that a pull is ongoing! An alternative might be to inform the user that they can refresh (is it really needed?).
It would require some refactoring to support async commands.
@TheLostLambda I implemented this (I think) :) I'll leave it on this PR for a while in case you or anyone like to test it out, or have any input.
Exciting! I'll take a look and kick the tires!
At some point, it might be nice to make the calls to
git push
,git pull
, andgit fetch
(anything that relies on the network) asynchronous! I'm stuck on a quite slow connection, so when I go to push my changes, the UI freezes up for a while!I could just wait to do all of my pushing at once (after staging and committing everything outstanding), but it might be a nice quality of life feature to decouple the UI responsiveness from network access!