Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
mindolph committed Feb 20, 2024
2 parents ce1f5b3 + 5f4267c commit d70752b
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ public InputHelperManager(Object editorId, String fileType) {
});
return listCell;
});

lvSuggestion.setOnKeyReleased(event -> {
System.out.println(event.getCode());
if (KeyCode.ESCAPE == event.getCode()) {
helpEvent.push(new HelpPayload(true, null));
}
});
}

public void updateCaret(double x, double y) {
Expand Down Expand Up @@ -227,13 +234,12 @@ else if (KeyCode.ESCAPE.equals(event.getCode())) {
}

/**
*
* @param payload
* @since 1.6.10
*/
private void handleHelpEvent(HelpPayload payload) {
if (payload.isQuitHelp) {
stackPane.setVisible(false);
this.hideHelper();
}
else {
updateAndShowSuggestions(payload.input);
Expand All @@ -246,7 +252,7 @@ private void updateAndShowSuggestions(String input) {
}
log.debug("search with: '%s'".formatted(input));

// note: hide first because there might be no matching at last, in that case the menu needs to be hidden.
// note: hide first because there might be no matching at last, in that case the helper pane needs to be hidden.
this.hideHelper();
lvSuggestion.getItems().clear();

Expand Down

0 comments on commit d70752b

Please sign in to comment.