File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Here you can find the recent changes to tmuxp.
1212- [internal]: fix :meth:``Window.kill_window()`` target to
1313 ``session_id:window_index`` for compatibility and pass tests.
1414- [docs] [examples]: Example for ``start_directory``.
15+ - [internal] fix bug where first and second window would load in mixed order
16+ - [internal] :class:`Window.move_window()` for moving window.
1517
16182013-10-30
1719----------
Original file line number Diff line number Diff line change 2222
2323import logging
2424
25- __version__ = '0.0.29 '
25+ __version__ = '0.0.30 '
Original file line number Diff line number Diff line change @@ -251,8 +251,6 @@ def kill_window(self):
251251
252252 Kill the current :class:`Window` object.
253253
254- :param target_window: the ``target window``.
255- :type target_window: string
256254 '''
257255
258256 proc = self .tmux (
@@ -266,6 +264,27 @@ def kill_window(self):
266264
267265 self .server ._update_windows ()
268266
267+ def move_window (self , destination ):
268+ '''
269+ ``$ tmux move-window``
270+
271+ move the current :class:`Window` object.
272+
273+ :param destination: the ``target window`` or index to move the window
274+ to.
275+ :type target_window: string
276+ '''
277+
278+ proc = self .tmux (
279+ 'move-window' ,
280+ '-s%s:%s' % (self .get ('session_id' ), self .get ('window_index' )),
281+ '-t%s' % destination ,
282+ )
283+
284+ if proc .stderr :
285+ raise Exception (proc .stderr )
286+
287+ self .server ._update_windows ()
269288
270289 def select_pane (self , target_pane ):
271290 '''
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def iter_create_windows(self, s):
164164 w1 = None
165165 if i == int (1 ): # if first window, use window 1
166166 w1 = s .attached_window ()
167- w1 .attached_pane (). send_keys ( 'la' )
167+ w1 .move_window ( 99 )
168168 w = s .new_window (
169169 window_name = window_name ,
170170 start_directory = wconf ['start_directory' ] if 'start_directory' in wconf else None ,
You can’t perform that action at this time.
0 commit comments