Commit ee9762a4 authored by Kåre Särs's avatar Kåre Särs
Browse files

S&R: Fix search string getting deleted if search combo is empty.

parent f12456dd
......@@ -1154,7 +1154,12 @@ void KatePluginSearchView::startSearchWhileTyping()
int cursorPosition = m_ui.searchCombo->lineEdit()->cursorPosition();
bool hasSelected = m_ui.searchCombo->lineEdit()->hasSelectedText();
m_ui.searchCombo->setItemText(0, currentSearchText);
if (m_ui.searchCombo->count() == 0) {
m_ui.searchCombo->insertItem(0, currentSearchText);
else {
m_ui.searchCombo->setItemText(0, currentSearchText);
if (hasSelected) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment