Skip to content

Commit 27f34ca

Browse files
committed
!squash
1 parent b0b0b2b commit 27f34ca

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

poetry.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tmuxp/workspace/freezer.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def freeze(session):
5959
wconf = {
6060
"options": w.show_window_options(),
6161
"window_name": w.name,
62-
"layout": w.layout,
62+
"layout": w.window_layout,
6363
"panes": [],
6464
}
6565
if w.get("window_active", "0") == "1":
@@ -68,21 +68,21 @@ def freeze(session):
6868
# If all panes have same path, set 'start_directory' instead
6969
# of using 'cd' shell commands.
7070
def pane_has_same_path(p):
71-
return w.panes[0].current_path == p.current_path
71+
return w.panes[0].pane_current_path == p.pane_current_path
7272

7373
if all(pane_has_same_path(p) for p in w.panes):
74-
wconf["start_directory"] = w.panes[0].current_path
74+
wconf["start_directory"] = w.panes[0].pane_current_path
7575

7676
for p in w.panes:
7777
pconf = {"shell_command": []}
7878

7979
if "start_directory" not in wconf:
80-
pconf["shell_command"].append("cd " + p.current_path)
80+
pconf["shell_command"].append("cd " + p.pane_current_path)
8181

8282
if p.get("pane_active", "0") == "1":
8383
pconf["focus"] = "true"
8484

85-
current_cmd = p.current_command
85+
current_cmd = p.pane_current_command
8686

8787
def filter_interpretters_and_shells():
8888
return current_cmd.startswith("-") or any(

tests/test_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def test_load_symlinked_workspace(
195195
assert session.name == "samplesimple"
196196

197197
assert pane is not None
198-
assert pane.current_path == str(realtemp)
198+
assert pane.pane_current_path == str(realtemp)
199199

200200

201201
if t.TYPE_CHECKING:

tests/workspace/test_builder.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ def f():
108108
nonlocal p
109109
p = w.attached_pane
110110
p.server._update_panes()
111-
return p.current_path == pane_path
111+
return p.pane_current_path == pane_path
112112

113113
assert retry_until(f)
114114

115-
assert p.current_path == pane_path
115+
assert p.pane_current_path == pane_path
116116

117117
proc = session.cmd("show-option", "-gv", "base-index")
118118
base_index = int(proc.stdout[0])
@@ -128,11 +128,11 @@ def f():
128128
nonlocal p
129129
p = window3.attached_pane
130130
p.server._update_panes()
131-
return p.current_path == pane_path
131+
return p.pane_current_path == pane_path
132132

133133
assert retry_until(f)
134134

135-
assert p.current_path == pane_path
135+
assert p.pane_current_path == pane_path
136136

137137

138138
@pytest.mark.skip(
@@ -514,7 +514,7 @@ def test_start_directory(session, tmp_path: pathlib.Path):
514514

515515
def f():
516516
p.server._update_panes()
517-
pane_path = p.current_path
517+
pane_path = p.pane_current_path
518518
return path in pane_path or pane_path == path
519519

520520
# handle case with OS X adding /private/ to /tmp/ paths
@@ -565,7 +565,7 @@ def test_start_directory_relative(session, tmp_path: pathlib.Path):
565565
def f():
566566
p.server._update_panes()
567567
# Handle case where directories resolve to /private/ in OSX
568-
pane_path = p.current_path
568+
pane_path = p.pane_current_path
569569
return path in pane_path or pane_path == path
570570

571571
assert retry_until(f)
@@ -640,7 +640,7 @@ def test_pane_order(session):
640640

641641
def f():
642642
p.server._update_panes()
643-
return p.current_path == pane_path
643+
return p.pane_current_path == pane_path
644644

645645
assert retry_until(f)
646646

@@ -1233,7 +1233,7 @@ def test_first_pane_start_directory(session, tmp_path: pathlib.Path):
12331233

12341234
def f():
12351235
p.server._update_panes()
1236-
pane_path = p.current_path
1236+
pane_path = p.pane_current_path
12371237
return path in pane_path or pane_path == path
12381238

12391239
# handle case with OS X adding /private/ to /tmp/ paths
@@ -1257,10 +1257,10 @@ def test_layout_main_horizontal(session):
12571257
main_horizontal_pane, *panes = window.panes
12581258

12591259
def height(p):
1260-
return int(p._info["pane_height"])
1260+
return int(p.pane_height)
12611261

12621262
def width(p):
1263-
return int(p._info["pane_width"])
1263+
return int(p.pane_width)
12641264

12651265
main_horizontal_pane_height = height(main_horizontal_pane)
12661266
pane_heights = [height(pane) for pane in panes]

0 commit comments

Comments
 (0)