Open ondrejj opened 5 years ago
This code works, but it's a bit very hard hack:
import prompt_toolkit.buffer
orig_start_completion = prompt_toolkit.buffer.Buffer.start_completion
def buffer_start_completion(self, select_first=False,
select_last=False, insert_common_part=False,
complete_event=None):
return orig_start_completion(self, True, False, False, complete_event)
prompt_toolkit.buffer.Buffer.start_completion = buffer_start_completion
Any change to make it possible to do this nicer?
With prompt_toolkit 1 it was possible to return multiple completions and always first completion was selected. After update to PT2, this isn't possible. When I try to complete with TAB key, only partial completion is used (only "msg" string) and second TAB should be pressed to full completion. Can I somehow emulate PT1 behaviour? Here is my example code:
I need after first TAB to see "msg test" in prompt.