Preserve cwd into new windows. Closes LP #597651
This commit is contained in:
parent
838d27bb60
commit
581a738c62
|
@ -1482,7 +1482,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
|||
self.emit('ungroup-tab')
|
||||
|
||||
def key_new_window(self):
|
||||
self.terminator.new_window()
|
||||
self.terminator.new_window(self.terminator.pid_cwd(self.pid))
|
||||
|
||||
def key_new_terminator(self):
|
||||
cmd = sys.argv[0]
|
||||
|
|
|
@ -139,11 +139,13 @@ class Terminator(Borg):
|
|||
dbg('Terminator::deregister_terminal: %d terminals remain' %
|
||||
len(self.terminals))
|
||||
|
||||
def new_window(self):
|
||||
def new_window(self, cwd=None):
|
||||
"""Create a window with a Terminal in it"""
|
||||
maker = Factory()
|
||||
window = maker.make('Window')
|
||||
terminal = maker.make('Terminal')
|
||||
if cwd:
|
||||
terminal.set_cwd(cwd)
|
||||
window.add(terminal)
|
||||
window.show()
|
||||
terminal.spawn_child()
|
||||
|
|
Loading…
Reference in New Issue