Hi All,
I’m not sure what I’m doing wrong here, I’ve been through the info in this thread and everything looks right to me, but the behavior is not what I was expecting.
Kak file defining some representative completions
decl completions test_completions
def -override enable_test_completions %{
set-option window completers option=test_completions %opt{completers}
}
def -override test_one %{
# Line one should be "Unix.sleep"
set-option window test_completions "1.6+5@%val{timestamp}" "sleep||sleep" \
"sleepf||sleepf"
}
def -override test_two %{
# Line two should be "Kak.send"
set-option window test_completions "2.5+4@%val{timestamp}" "send||send" \
"setup_recv_sync||setup_recv_sync" "setup_send_async||setup_send_async" \
"setup_send_sync||setup_send_sync" "squote||squote"
}
If I edit a file with these contents:
Unix.sleep
Kak.send
Run these commands
:source test.kak
, :enable_test_completions
, :test_one
Put the cursor here
Unix.sleep
^
and select the second completion sleepf
I end up with
sleepfsleep
Kak.send
If I shorten the completion length by 1 to 1.6+4
I get
Unix.sleepfp
Kak.send
Note the trailing extra p
Thanks