mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
feat(core): Add trailing space when completing an at completion suggestion (#5475)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
02e44e5db2
commit
8ba12269d5
2 changed files with 14 additions and 9 deletions
|
|
@ -111,7 +111,7 @@ export function useSlashCompletion(
|
|||
|
||||
useEffect(() => {
|
||||
if (commandIndex === -1 || reverseSearchActive) {
|
||||
resetCompletionState();
|
||||
setTimeout(resetCompletionState, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -631,17 +631,17 @@ export function useSlashCompletion(
|
|||
) {
|
||||
suggestionText = ' ' + suggestionText;
|
||||
}
|
||||
suggestionText += ' ';
|
||||
}
|
||||
|
||||
suggestionText += ' ';
|
||||
|
||||
buffer.replaceRangeByOffset(
|
||||
logicalPosToOffset(buffer.lines, cursorRow, completionStart.current),
|
||||
logicalPosToOffset(buffer.lines, cursorRow, completionEnd.current),
|
||||
suggestionText,
|
||||
);
|
||||
resetCompletionState();
|
||||
},
|
||||
[cursorRow, resetCompletionState, buffer, suggestions, commandIndex],
|
||||
[cursorRow, buffer, suggestions, commandIndex],
|
||||
);
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue