Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Unnecessarily overwriting status-left or right #28

Closed
adrianluff opened this issue Jul 17, 2016 · 7 comments
Closed

Unnecessarily overwriting status-left or right #28

adrianluff opened this issue Jul 17, 2016 · 7 comments

Comments

@adrianluff
Copy link

adrianluff commented Jul 17, 2016

Presently tmux-gitbar overwrites the entire status-left or status-right tmux configuration. While the default status line is restored this limitation restricts TMGB's utility.

Consider tmux-gitbar.sh line 176:

tmux set-window-option -a "status-$TMGB_STATUS_LOCATION" "$status_string" > /dev/null

replaced with:

tmux set-window-option "status-$TMGB_STATUS_LOCATION" "$TMGB_OUTREPO_STATUS" > /dev/null
tmux set-window-option -a "status-$TMGB_STATUS_LOCATION" "$status_string" > /dev/null

The new behavior is to restore the default each time, then ADD (-a) the TMGB information to the user's existing tmux status line.

@arl
Copy link
Owner

arl commented Aug 7, 2016

Hi Adrian, thank for your input, that seems legit.
FYI i took the initiative to split this issue into two different ones because they are not directly dependent, so i edit your issue text and copied the second part into #30

For current issue, I'll have a look into it to see if there can't be side effects, though i guess not.

@arl
Copy link
Owner

arl commented Aug 7, 2016

Ok, i created PR #31 to fix this issue. Previous statuses are not overwritten anymore.
Thanks for the input again. Basically i'm appending the tmgb status to the previous one, after having also restored the out-of-repo style, meaning that different style should coexist on the same part of the tmux status bar. Before merging this PR, I'd be very happy to hear about you @adrianluff and know if there are any side effects.

@adrianluff
Copy link
Author

The only issue I've observed running with this for the last few weeks is an occasional visible screen redraw when tmux updates the status line twice in quick succession. That seems like a tmux issue though.

I will update with the latest PRs and report back as soon as I'm able.

@arl
Copy link
Owner

arl commented Aug 7, 2016

Great!

@arl
Copy link
Owner

arl commented Aug 8, 2016

I just thought about the issue you are talking about, it's probably the
consequence of the two successive calls to set-window-option, both triggers
a status line redraw. In my PR I didn't think of that and will update it
accordingly, strings concatenation should be performed in bash where
possible and the result sent to tmux, triggering an unique status redraw

Le 7 août 2016 18:41, "adrianluff" notifications@github.com a écrit :

The only issue I've observed running with this for the last few weeks is
an occasional visible screen redraw when tmux updates the status line twice
in quick succession. That seems like a tmux issue though.

I will update with the latest PRs and report back as soon as I'm able.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAdF6t4jt5ne55HTDn_AHVGzXbkeXD7pks5qdgrXgaJpZM4JOTOf
.

@adrianluff
Copy link
Author

I was able to test your pull request for this issue. Works great here!

@arl
Copy link
Owner

arl commented Aug 29, 2016

Closing, #30 has been merged into master

@arl arl closed this as completed Aug 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants