diff options
author | Marc Jauvin <marc.jauvin@gmail.com> | 2018-02-10 00:38:27 -0500 |
---|---|---|
committer | Marc Jauvin <marc.jauvin@gmail.com> | 2018-02-10 00:38:27 -0500 |
commit | c6ad23f9215f361426b254734ec5c4168fc55a94 (patch) | |
tree | bb9229bf35d49318304e088e4f00dfd29c201307 /qutebrowser/mainwindow/prompt.py | |
parent | f16f425cb12071720dadf82e6aca0bb85adf1c74 (diff) | |
download | qutebrowser-c6ad23f9215f361426b254734ec5c4168fc55a94.tar.gz qutebrowser-c6ad23f9215f361426b254734ec5c4168fc55a94.zip |
address all mentionned issues except for file://
- re-encode url using QUrl.RemovePassword | QUrl.FullyEncoded
- improve readability for clipboard / primary selection code block
Diffstat (limited to 'qutebrowser/mainwindow/prompt.py')
-rw-r--r-- | qutebrowser/mainwindow/prompt.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index aff6701fc..b502f1f3d 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -432,16 +432,16 @@ class PromptContainer(QWidget): sel: Use the primary selection instead of the clipboard. """ question = self._prompt.question - if not question.url: + if question.url is None: message.error('No URL found.') return - s = question.url - target = 'primary selection' - if not (sel and utils.supports_selection()): - target = 'clipboard' + if sel and utils.supports_selection(): + target = 'primary selection' + else: sel = False - utils.set_clipboard(s, sel) - message.info("Yanked to {}: {}".format(target, s)) + target = 'clipboard' + utils.set_clipboard(question.url, sel) + message.info("Yanked to {}: {}".format(target, question.url)) class LineEdit(QLineEdit): |