diff options
author | Sameem Zahoor Taray <zsameem@gmail.com> | 2021-02-20 22:28:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 22:28:54 +0100 |
commit | 2c3f284b06cfef2fb62301e4ec2cd93070319780 (patch) | |
tree | 296d52e0b8d4b8939998cdcfe77110f3f0906d94 | |
parent | 074e2ffdfd0605be4083b594c007f321168c5eac (diff) | |
download | serenity-2c3f284b06cfef2fb62301e4ec2cd93070319780.zip |
Run: Prevent printing [null] in case of empty history (#5433)
Pressing up-arrow or down-arrow with empty command history printed
[null] in the text area.
Fixes #5426
-rw-r--r-- | Userland/Applications/Run/RunWindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/Run/RunWindow.cpp b/Userland/Applications/Run/RunWindow.cpp index 3050774a6a..95aeaa9a41 100644 --- a/Userland/Applications/Run/RunWindow.cpp +++ b/Userland/Applications/Run/RunWindow.cpp @@ -101,6 +101,8 @@ void RunWindow::event(Core::Event& event) // Escape key pressed, close dialog close(); return; + } else if ((key_event.key() == Key_Up || key_event.key() == Key_Down) && m_path_history.is_empty()) { + return; } } |