-
Notifications
You must be signed in to change notification settings - Fork 232
WIP. Empty window titles cause errors. #183 #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
session_name: Window index example | ||
windows: | ||
- window_name: '' | ||
panes: | ||
- echo "This window has an empty title" | ||
- window_name: "" | ||
panes: | ||
- echo "So is this." | ||
window_index: 5 | ||
- window_name: | ||
panes: | ||
- echo "And this one too." |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -384,6 +384,9 @@ def pane_has_same_path(p): | |||||||
if all(pane_has_same_path(p) for p in w.panes): | ||||||||
wconf['start_directory'] = w.panes[0].current_path | ||||||||
|
||||||||
if w.name == '': | ||||||||
empty_window_title = True | ||||||||
Comment on lines
+387
to
+388
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Assures the variable is always declared Should fix https://github.com/tmux-python/tmuxp/pull/189/checks?check_run_id=991200510#step:15:372:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That resolves the unbound variable. I am adding that change. |
||||||||
|
||||||||
for p in w.panes: | ||||||||
pconf = {'shell_command': []} | ||||||||
|
||||||||
|
@@ -410,6 +413,8 @@ def filter_interpretters_and_shells(): | |||||||
pconf = 'pane' | ||||||||
|
||||||||
wconf['panes'].append(pconf) | ||||||||
if empty_window_title: | ||||||||
pconf['shell_command'].append('tmux rename-session \'\'') | ||||||||
|
||||||||
sconf['windows'].append(wconf) | ||||||||
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not change the outcome of the test_window_title. As expected. The if statements - before and after the suggested changes - are equivalent. Were you expecting something different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found something.
window_name
is being set totmux
. Hence the failing assertion. Now, need to dig where this is happening.