mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
fixed autocompletion for pasting text
This commit is contained in:
@@ -62,9 +62,9 @@ public class RecoveryKeyRecoverController implements FxController {
|
||||
String currentWord = text.substring(beginOfWord, caretPos);
|
||||
Optional<String> suggestion = autoCompleter.autocomplete(currentWord);
|
||||
if (suggestion.isPresent()) {
|
||||
String completion = suggestion.get().substring(currentWord.length() - 1);
|
||||
change.setText(completion);
|
||||
change.setAnchor(caretPos + completion.length() - 1);
|
||||
String completion = suggestion.get().substring(currentWord.length());
|
||||
change.setText(change.getText() + completion);
|
||||
change.setAnchor(caretPos + completion.length());
|
||||
}
|
||||
}
|
||||
return change;
|
||||
@@ -86,7 +86,6 @@ public class RecoveryKeyRecoverController implements FxController {
|
||||
@FXML
|
||||
public void recover() {
|
||||
recoveryKeyFactory.validateRecoveryKey(textarea.getText());
|
||||
|
||||
}
|
||||
|
||||
/* Getter/Setter */
|
||||
|
||||
Reference in New Issue
Block a user