diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 5cb9e9e0b..7b7a043b3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -23,6 +23,8 @@ Changed - Some developer scripts got moved to `scripts/dev/` - When downloading to a FIFO or special file, a confirmation is displayed as this might cause qutebrowser to hang. +- The `:yank-selected` command now works in all modes instead of just caret + mode and is not hidden anymore. v0.3.0 ------ diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index a822fbb10..0c25a8468 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -57,6 +57,7 @@ |<>|Show the source of the current page. |<>|Save open pages and quit. |<>|Yank the current URL/title to the clipboard or primary selection. +|<>|Yank the selected text to the clipboard or primary selection. |<>|Set the zoom level for the current tab. |<>|Increase the zoom level for the current tab. |<>|Decrease the zoom level for the current tab. @@ -673,6 +674,16 @@ Yank the current URL/title to the clipboard or primary selection. * +*-s*+, +*--sel*+: Use the primary selection instead of the clipboard. * +*-d*+, +*--domain*+: Yank only the scheme, domain, and port number. +[[yank-selected]] +=== yank-selected +Syntax: +:yank-selected [*--sel*] [*--keep*]+ + +Yank the selected text to the clipboard or primary selection. + +==== optional arguments +* +*-s*+, +*--sel*+: Use the primary selection instead of the clipboard. +* +*-k*+, +*--keep*+: If given, stay in visual mode after yanking. + [[zoom]] === zoom Syntax: +:zoom ['zoom']+ @@ -760,7 +771,6 @@ How many steps to zoom out. |<>|Continue the search to the ([count]th) next term. |<>|Continue the search to the ([count]th) previous term. |<>|Toggle caret selection mode. -|<>|Yank the selected text to the clipboard or primary selection. |============== [[clear-keychain]] === clear-keychain @@ -1112,16 +1122,6 @@ How many elements to ignore. === toggle-selection Toggle caret selection mode. -[[yank-selected]] -=== yank-selected -Syntax: +:yank-selected [*--sel*] [*--keep*]+ - -Yank the selected text to the clipboard or primary selection. - -==== optional arguments -* +*-s*+, +*--sel*+: Use the primary selection instead of the clipboard. -* +*-k*+, +*--keep*+: If given, stay in visual mode after yanking. - == Debugging commands These commands are mainly intended for debugging. They are hidden if qutebrowser was started without the `--debug`-flag. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 92fbc1042..538107a42 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1542,8 +1542,7 @@ class CommandDispatcher: act = QWebPage.SelectEndOfDocument webview.triggerPageAction(act) - @cmdutils.register(instance='command-dispatcher', hide=True, - modes=[KeyMode.caret], scope='window') + @cmdutils.register(instance='command-dispatcher', scope='window') def yank_selected(self, sel=False, keep=False): """Yank the selected text to the clipboard or primary selection. @@ -1568,7 +1567,7 @@ class CommandDispatcher: message.info(self._win_id, "{} {} yanked to {}".format( len(s), "char" if len(s) == 1 else "chars", target)) if not keep: - modeman.leave(self._win_id, KeyMode.caret, "yank selected") + modeman.maybe_leave(self._win_id, KeyMode.caret, "yank selected") @cmdutils.register(instance='command-dispatcher', hide=True, modes=[KeyMode.caret], scope='window')