diff options
| author | potatoalienof13 <potatoalienof13@gmail.com> | 2022-12-21 17:46:49 -0500 |
|---|---|---|
| committer | potatoalienof13 <potatoalienof13@gmail.com> | 2022-12-21 17:46:49 -0500 |
| commit | 041c88c930d5908ecbf6dd44e31ed197d8c4007e (patch) | |
| tree | af9beae3c7718384679b6f0ac326d95d3f7f62cb /src/insert_completer.cc | |
| parent | 938be7a7b0fb0753329bc74735e4d9d2132ea28c (diff) | |
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.
Diffstat (limited to 'src/insert_completer.cc')
| -rw-r--r-- | src/insert_completer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc index 83e51d63..c18b3961 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -481,7 +481,7 @@ bool InsertCompleter::has_candidate_selected() const 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(); } |
