feat: Added responsive status redraws for pane_current_command#4968
Draft
daneofmanythings wants to merge 2 commits into
Draft
feat: Added responsive status redraws for pane_current_command#4968daneofmanythings wants to merge 2 commits into
pane_current_command#4968daneofmanythings wants to merge 2 commits into
Conversation
Member
|
Hmm not sure about this. I think this should maybe |
`automatic-rename`
Member
Author
|
I completely missed that somehow. I have reworked things to use Tracking state is still the same. The big difference is that the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue this PR solves is delayed redraws of the status line when using the format variable
pane_current_command. Before, the status wouldn't be triggered to redraw when the shell had a new command ran in it. This left the format variable feeling laggy, often displaying outdated information until manual intervention.I have added a new stateful field to
struct window_paneto store the last "seen" foreground pid running at the pane's file descriptor. A new check is make across all clients inserver-client.c:server_client_loop, to determine if there is a new fg pid at each of the panes being displayed by the client. Finding one such pane will exit early and trigger a status redraw.The added complexity is minimal, but not nothing considering currently this only affects a single format variable. I find this to be the most useful format variable for panes on the status line, so I may be biased towards this feature.
@mgrant0