Commit f7e7d9f
committed
Pane(fix[swap]): make target optional when move_up/move_down is set
why: pane.swap(move_up=True) raised TypeError because target was
positionally required, contradicting the docstring claim that
move_up/move_down "overrides target". The body also emitted
-s <target> unconditionally even with -U/-D.
what:
- Make target optional with default None
- Raise LibTmuxException for missing/conflicting flag combinations
(no flags, both move flags, target combined with a move flag)
- Skip -s <target> when target is None
- Update docstring: "Mutually exclusive with target" + versionchanged 0.56
- Add tests covering move_up/move_down happy path and three invalid
argument combinations1 parent 78d4247 commit f7e7d9f
2 files changed
Lines changed: 75 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2030 | 2030 | | |
2031 | 2031 | | |
2032 | 2032 | | |
2033 | | - | |
| 2033 | + | |
2034 | 2034 | | |
2035 | 2035 | | |
2036 | 2036 | | |
| |||
2041 | 2041 | | |
2042 | 2042 | | |
2043 | 2043 | | |
2044 | | - | |
| 2044 | + | |
2045 | 2045 | | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
2046 | 2051 | | |
2047 | 2052 | | |
2048 | 2053 | | |
2049 | | - | |
| 2054 | + | |
| 2055 | + | |
2050 | 2056 | | |
2051 | | - | |
| 2057 | + | |
| 2058 | + | |
2052 | 2059 | | |
2053 | 2060 | | |
2054 | 2061 | | |
| |||
2061 | 2068 | | |
2062 | 2069 | | |
2063 | 2070 | | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
2064 | 2083 | | |
2065 | 2084 | | |
2066 | 2085 | | |
| |||
2075 | 2094 | | |
2076 | 2095 | | |
2077 | 2096 | | |
2078 | | - | |
2079 | | - | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
2080 | 2100 | | |
2081 | 2101 | | |
2082 | 2102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
1180 | 1181 | | |
1181 | 1182 | | |
1182 | 1183 | | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1183 | 1232 | | |
1184 | 1233 | | |
1185 | 1234 | | |
| |||
0 commit comments