diff --git a/win/Qt/qt_menu.cpp b/win/Qt/qt_menu.cpp index ab8b59ea7..1a549a8e0 100644 --- a/win/Qt/qt_menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -1192,6 +1192,8 @@ void NetHackQtTextWindow::Search() if (get_a_line) { int linecount = lines->count(); int current = lines->currentRow(); + if (current == -1) + current = 0; // when no row is highlighted (selected), start the search // on the current row, otherwise start on the row after it // [normally means that the very first row is a candidate