diff options
author | Andrew MacFie <amacfie@sent.com> | 2021-02-02 15:03:56 -0500 |
---|---|---|
committer | Andrew MacFie <amacfie@sent.com> | 2021-02-02 15:03:56 -0500 |
commit | 8885ad1392255eceb3f38270f685545934815099 (patch) | |
tree | 28ae3b990380148c04e71e4b65aa577e2cfc3c95 /qutebrowser/mainwindow | |
parent | 564401474f896b62a10ce653862435a9b0f23419 (diff) | |
download | qutebrowser-8885ad1392255eceb3f38270f685545934815099.tar.gz qutebrowser-8885ad1392255eceb3f38270f685545934815099.zip |
Don't save commands starting w/ space
Diffstat (limited to 'qutebrowser/mainwindow')
-rw-r--r-- | qutebrowser/mainwindow/statusbar/command.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index fb09b66db..92408d34f 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -187,11 +187,12 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): Args: rapid: Run the command without closing or clearing the command bar. """ - text = self.text() - self.history.append(text) - was_search = self._handle_search() + text = self.text() + if not (self.prefix() == ':' and text[1:].startswith(' ')): + self.history.append(text) + if not rapid: modeman.leave(self._win_id, usertypes.KeyMode.command, 'cmd accept') |