Closed chaorace closed 4 years ago
Submitted a PR with the fix I am using. I'm operating under the assumption that ansi-color-filter-apply is not actually serving any useful purpose and can be safely removed.
Resolved in commit 5ba8bff2ee089f05cf2c2ae1a1bcf8f31807894a
https://github.com/CeleritasCelery/emacs-native-shell-complete/blob/e46a936a7239621a8ff55af007a10079c4f2b817/native-complete.el#L122
native-complete-get-completions
callsansi-color-filter-apply
, which will apply any ansi color sequences that were previously left unfinished (see documentation for variableansi-color-context
). The function doesn't seem to be expecting this, because it always returns nil in this situation, even when there are valid completions.Because
ansi-color-context
persists until the fragment is closed, autocomplete becomes completely broken untilansi-color-context
is cleared or the buffer is killed.I was able to resolve this issue for myself by simply removing
(ansi-color-filter-apply)
. I'm not really sure why we're even attempting to apply ansi color to autocompletion items in the first place!