Sublime Forum

Input panel closes when completions visible and press enter

#1

I am trying to write a find file command using an input panel, where you start typing but when you press space or tab it does a completion right there, showing the set of files that match given the current input.

It uses auto_complete.

It works except that if I press Enter instead of Tab for the current selected item in the auto complete panel, it calls the done method on my input panel. I want the Enter to select the completion like it does in regular views.

Is there something I can do about this?

Is there any way to prevent the input panel from being closed when the Enter key is pressed?

I tried to create a no-op key binding for “enter” when the input panel is open but that didn’t seem to help.

0 Likes

#2

I think this “enter” binding might be hard-coded, especially if replacing the default enter binding with a “noop” doesn’t help.

1 Like

How to make enter autocomplete on a panel when the auto complete is open?
#3

Yeah - I think you’re right. Sadly things like this make a big difference.

I suppose I should file a “request for enhancement”.

0 Likes