Dual solution for cwd based on comments 36 & 37 by Egmont Koblinger in LP#1030562
This commit is contained in:
parent
43c134b5c5
commit
d53b036642
|
@ -210,9 +210,13 @@ class Terminal(Gtk.VBox):
|
||||||
|
|
||||||
def get_cwd(self):
|
def get_cwd(self):
|
||||||
"""Return our cwd"""
|
"""Return our cwd"""
|
||||||
# Disabled and reverted to revert to old style cwd detection as only returns None.
|
vte_cwd = self.vte.get_current_directory_uri()
|
||||||
# return(GLib.filename_from_uri(self.vte.get_current_directory_uri())[0])
|
if vte_cwd:
|
||||||
return(self.terminator.pid_cwd(self.pid))
|
# OSC7 pwd gives an answer
|
||||||
|
return(GLib.filename_from_uri(vte_cwd)[0])
|
||||||
|
else:
|
||||||
|
# Fall back to old gtk2 method
|
||||||
|
return(self.terminator.pid_cwd(self.pid))
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Close ourselves"""
|
"""Close ourselves"""
|
||||||
|
|
Loading…
Reference in New Issue