Edit URL now opens the external editor

This commit is contained in:
Jesson Soto Ventura 2019-07-22 23:14:56 -04:00
parent 0b0b4ccba6
commit 8a2a7652e4
1 changed files with 6 additions and 1 deletions

View File

@ -428,7 +428,12 @@ class ConsoleAddon:
message.content = c.rstrip(b"\n")
elif part == "set-cookies":
self.master.switch_view("edit_focus_setcookies")
elif part in ["url", "method", "status_code", "reason"]:
elif part == "url":
url = flow.request.url.encode()
edited_url = self.master.spawn_editor(url)
url = edited_url.rstrip(b"\n")
flow.request.url = url.decode()
elif part in ["method", "status_code", "reason"]:
self.master.commands.execute(
"console.command flow.set @focus %s " % part
)