Retain spaces in quoted strings in window options#37
Retain spaces in quoted strings in window options#37tony merged 3 commits intotmux-python:masterfrom
Conversation
Fixes tmux-python/tmuxp#239 With the below in tmux config: setw -g pane-border-format " #P " Before the fix: ('pane-border-format', '"', '#P', '"') After the fix: ('pane-border-format', ' #P ')
2c98c07 to
8900f52
Compare
|
I added a test you can work again, but shlex.split isn't storing the expected value. |
|
I also rebased it against the latest changes, and dropped python 2.6 |
|
Can you give it a look @kaushalmodi? |
|
Will have a look.. could probably mean that |
|
I am missing out something obvious here.. how do I run the I tried |
|
Did you try loading the project with Also you can do |
|
I got this from the |
|
Rerun it and see if it keeps happening. Could be a fluke. |
|
Still getting the same error.. will tackle this tomorrow. Thanks for the guidance. |
|
Yes go ahead, and try to do it via |
|
I'll need your help to understand this problem.. here is my debug attempt: kaushalmodi@5e94ad8 Running gives Also it probably needs to be assert window.show_window_options('pane-border-format') == '" #P "'instead of assert window.show_window_options('pane-border-format') == [' #P ']? Update Going down the rabbit hole.. kaushalmodi@6808f29 |
|
I am at a deadend now.. In the failing case ( |
|
I think it's understable that "format" type options such as:
Are wrapped in quotes. I think that these options should be unquoted on show, and re-quoted on setting. |
The pane-border-format option was introduced in tmux 2.3, so do not run a test for that on older versions.
6bea5d3 to
6a3a024
Compare
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 79.9% 79.92% +0.02%
==========================================
Files 8 8
Lines 841 842 +1
==========================================
+ Hits 672 673 +1
Misses 169 169
Continue to review full report at Codecov.
|
That is not needed after part 2 of the fix; now comparison is with just And all the tests are now passing too! .. though I still get this one failure. I don't get why Travis passes but it fails when I run |
@kaushalmodi Can I see your .tmux.conf? How big is your terminal window? Have you tried making the font smaller/terminal window bigger so there are more cells? |
| assert window.show_window_options('main-pane-height') == 40 | ||
| assert window.show_window_options()['main-pane-height'] == 40 | ||
|
|
||
| if has_gte_version('2.3'): |
There was a problem hiding this comment.
That was just added yesterday, looks like that function is already useful. 😄
I didn't realize that
No I got that error to go away if I moved my ~.tmux.conf. I can incrementally comment my config to see what's causing that. Thanks. |
|
It's caused when the pane border is enabled!
Update: And that too only when set to "bottom".. hmm This works fine:
|
|
Could you move your Just trying to isolate if its a config issue or something else. |
That's what I did (see above).
Yup. |
Just read that, sorry. So did moving the tmux config make it test error go away? |
Yes. That fixed the error, and also changing the |
|
Okay that makes sense. So yes I think we can say it's a config issue, for now, and that this issue is good to merge. LGTM |
Seems like a tmux issue. If I am in a tmux window with panes split into top/bottom, Thanks for merging this PR. |
Understood.
Thanks for your time and your contribution. It is now on pypi as libtmux 0.7.1. You are credited in the CHANGES. I thought there as an issue in tmuxp you had, but I can't find it. I still need to add a test on the tmuxp side. |
It is this same issue.. |


Fixes tmux-python/tmuxp#239
With the below in tmux config:
Before the fix:
After the fix: