Fix getting URL for startup commands.
This commit is contained in:
parent
42a1d7028d
commit
45ac2e4835
@ -32,10 +32,12 @@ def replace_variables(win_id, arglist):
|
||||
args = []
|
||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||
window=win_id)
|
||||
url = tabbed_browser.current_url().toString(QUrl.FullyEncoded |
|
||||
QUrl.RemovePassword)
|
||||
for arg in arglist:
|
||||
if arg == '{url}':
|
||||
# Note we have to do this in here as the user gets an error message
|
||||
# by current_url if no URL is open yet.
|
||||
url = tabbed_browser.current_url().toString(QUrl.FullyEncoded |
|
||||
QUrl.RemovePassword)
|
||||
args.append(url)
|
||||
else:
|
||||
args.append(arg)
|
||||
|
Loading…
Reference in New Issue
Block a user