(cherry picked from commit e55003174a)
Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
This commit is contained in:
co-authored by
Sven Grossmann
parent
21245470ae
commit
b2b87464d7
@@ -143,6 +143,8 @@ export function SuggestionsPlugin({
|
||||
|
||||
const preserveSuffix = suggestion.kind === 'function';
|
||||
const move = suggestion.move || 0;
|
||||
const moveForward = move > 0 ? move : 0;
|
||||
const moveBackward = move < 0 ? -move : 0;
|
||||
|
||||
const { typeaheadPrefix, typeaheadText, typeaheadContext } = state;
|
||||
|
||||
@@ -180,7 +182,8 @@ export function SuggestionsPlugin({
|
||||
.deleteBackward(backward)
|
||||
.deleteForward(forward)
|
||||
.insertText(suggestionText)
|
||||
.moveForward(move)
|
||||
.moveForward(moveForward)
|
||||
.moveBackward(moveBackward)
|
||||
.focus();
|
||||
|
||||
return editor;
|
||||
|
||||
Reference in New Issue
Block a user