mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
Fix bugs breaking drag and drop of files. (#4887)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
This commit is contained in:
parent
13b0971291
commit
de96887789
3 changed files with 32 additions and 27 deletions
|
|
@ -164,7 +164,8 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||
|
||||
const handleInput = useCallback(
|
||||
(key: Key) => {
|
||||
if (!focus) {
|
||||
/// We want to handle paste even when not focused to support drag and drop.
|
||||
if (!focus && !key.paste) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -349,7 +350,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
|
|||
],
|
||||
);
|
||||
|
||||
useKeypress(handleInput, { isActive: focus });
|
||||
useKeypress(handleInput, { isActive: true });
|
||||
|
||||
const linesToRender = buffer.viewportVisualLines;
|
||||
const [cursorVisualRowAbsolute, cursorVisualColAbsolute] =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue