Jelajahi Sumber

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
Sameem Zahoor Taray 4 tahun lalu
induk
melakukan
2c3f284b06
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      Userland/Applications/Run/RunWindow.cpp

+ 2 - 0
Userland/Applications/Run/RunWindow.cpp

@@ -101,6 +101,8 @@ void RunWindow::event(Core::Event& event)
             // Escape key pressed, close dialog
             // Escape key pressed, close dialog
             close();
             close();
             return;
             return;
+        } else if ((key_event.key() == Key_Up || key_event.key() == Key_Down) && m_path_history.is_empty()) {
+            return;
         }
         }
     }
     }