Skip to content

Revert v1.13.1's changes temporarily #811

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

Merged
merged 2 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
- Add [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) (#807)
- Add [flake8-comprehensions](https://github.com/adamchainz/flake8-comprehensions) (#808)

## tmuxp 1.13.x (unreleased)

- Revert v1.13.1's #793 change for now, the behavior behind launching workspace
layouts need to be understood clearly. Future releases will decisively solve
this issue (#811).

## tmuxp 1.13.2 (2022-09-10)

### Bug fixes
Expand Down
12 changes: 5 additions & 7 deletions tmuxp/workspacebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging
import time

from libtmux.common import has_gte_version
from libtmux.exc import TmuxSessionExists
from libtmux.pane import Pane
from libtmux.server import Server
Expand Down Expand Up @@ -221,10 +220,6 @@ def build(self, session=None, append=False):
assert self.sconf["session_name"] == session.name
assert len(self.sconf["session_name"]) > 0

if has_gte_version("2.9"):
# Use tmux default session size, overwrite Server::new_session
session.set_option("default-size", DEFAULT_SIZE)

self.session = session
self.server = session.server

Expand Down Expand Up @@ -272,6 +267,9 @@ def build(self, session=None, append=False):
assert isinstance(p, Pane)
p = p

if "layout" in wconf:
w.select_layout(wconf["layout"])

if "focus" in pconf and pconf["focus"]:
focus_pane = p

Expand All @@ -286,8 +284,6 @@ def build(self, session=None, append=False):
if focus_pane:
focus_pane.select_pane()

w.select_layout(wconf.get("layout", "even-vertical"))

if focus:
focus.select_window()

Expand Down Expand Up @@ -428,6 +424,8 @@ def get_pane_shell():
)

assert isinstance(p, Pane)
if "layout" in wconf:
w.select_layout(wconf["layout"])

if "suppress_history" in pconf:
suppress = pconf["suppress_history"]
Expand Down