Closed alecthomas closed 6 years ago
Maybe support ~
and $
is better:
def real_path(go_path):
if go_path is None:
return None
if -1 != go_path.find("$"):
return os.path.expandvars(go_path)
elif -1 != go_path.find("~"):
return os.path.expanduser(go_path)
else:
return go_path
Can godef read settings from sublime config ?
Maybe support ~ and $ is better:
There shouldn't be a need to explicitly check; expandvars and expanduser will do the right thing automatically.
@alecthomas Good. It's my mistake.
@jostyee Yes, but in the future. Mabe you can open a new issue to discuss it.
Thanks!
This was causing the Godef plugin to crash on load, which for some reason completely broke Sublime for me. Sublime refused to accept any keyboard input in the edit window.
Anyway, this correctly deals with None.