This commit attempts to fix a crash with -f. Specifically when kakoune
is run as > ./kak -f '2oK.k<c-n><ret><c-n>' /dev/null The crash occurs because when <c-n> is pressed for the second time, it attempts to use m_completions from the first press of <c-n>. This only happens when kakoune is run with -f, because when this is done interactively, there is a client, which means that m_completions gets reset. This removes the check that causes that difference. I am not *completely* sure that this is the best way to solve the problem, since I am not completely sure why that check was put there in the first place.
This commit is contained in:
parent
938be7a7b0
commit
041c88c930
|
@ -481,7 +481,7 @@ bool InsertCompleter::has_candidate_selected() const
|
||||||
|
|
||||||
void InsertCompleter::try_accept()
|
void InsertCompleter::try_accept()
|
||||||
{
|
{
|
||||||
if (m_completions.is_valid() and m_context.has_client() and has_candidate_selected())
|
if (m_completions.is_valid() and has_candidate_selected())
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user