Fix crash when finishing insert completion with no completion candidates
This commit is contained in:
parent
0cc89b2b9f
commit
f6e58e7271
|
@ -465,7 +465,10 @@ void InsertCompleter::reset()
|
|||
{
|
||||
if (m_explicit_completer or m_completions.is_valid())
|
||||
{
|
||||
String selected_item = std::move(m_completions.candidates[m_current_candidate].completion);
|
||||
String selected_item;
|
||||
if (m_current_candidate >= 0 and m_current_candidate < m_completions.candidates.size())
|
||||
selected_item = std::move(m_completions.candidates[m_current_candidate].completion);
|
||||
|
||||
m_explicit_completer = nullptr;
|
||||
m_completions = InsertCompletion{};
|
||||
if (m_context.has_client())
|
||||
|
|
Loading…
Reference in New Issue
Block a user