From 2c3f284b06cfef2fb62301e4ec2cd93070319780 Mon Sep 17 00:00:00 2001 From: Sameem Zahoor Taray Date: Sat, 20 Feb 2021 22:28:54 +0100 Subject: [PATCH] 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 --- Userland/Applications/Run/RunWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; } }