Skip to content

Commit 2e41f7c

Browse files
committed
Don't set -x/-y in sessions if inside tmux client
Related: - tmux-python/tmuxp#312 - tmux-python/tmuxp#309
1 parent 6d67378 commit 2e41f7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libtmux/server.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ def new_session(self,
477477
if start_directory:
478478
tmux_args += ('-c', start_directory)
479479

480-
if has_gte_version('2.6'):
480+
# tmux 2.6 gives unattached sessions a tiny default area
481+
# no need send in -x/-y if they're in a client already, though
482+
if has_gte_version('2.6') and 'TMUX' not in os.environ:
481483
tmux_args += ('-x', 800, '-y', 600)
482484

483485
proc = self.cmd(

0 commit comments

Comments
 (0)