mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Fix bug updating the cursor after navigating history. (#507)
This commit is contained in:
@@ -81,20 +81,12 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
||||
[onSubmit, buffer, resetCompletionState],
|
||||
);
|
||||
|
||||
const onChangeAndMoveCursor = useCallback(
|
||||
(newValue: string) => {
|
||||
buffer.setText(newValue);
|
||||
buffer.move('end');
|
||||
},
|
||||
[buffer],
|
||||
);
|
||||
|
||||
const inputHistory = useInputHistory({
|
||||
userMessages,
|
||||
onSubmit: handleSubmitAndClear,
|
||||
isActive: !completion.showSuggestions,
|
||||
currentQuery: buffer.text,
|
||||
onChangeAndMoveCursor,
|
||||
onChange: buffer.setText,
|
||||
});
|
||||
|
||||
const completionSuggestions = completion.suggestions;
|
||||
|
||||
Reference in New Issue
Block a user