mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 00:16:57 -07:00
fix(cli): refine platform-specific undo/redo and smart bubbling for WSL (#26202)
This commit is contained in:
@@ -2889,6 +2889,8 @@ export function useTextBuffer({
|
||||
transformationsByLine,
|
||||
pastedContent,
|
||||
expandedPaste,
|
||||
undoStack,
|
||||
redoStack,
|
||||
} = state;
|
||||
|
||||
const text = useMemo(() => lines.join('\n'), [lines]);
|
||||
@@ -3454,10 +3456,16 @@ export function useTextBuffer({
|
||||
return true;
|
||||
}
|
||||
if (keyMatchers[Command.UNDO](key)) {
|
||||
if (undoStack.length === 0) {
|
||||
return false;
|
||||
}
|
||||
undo();
|
||||
return true;
|
||||
}
|
||||
if (keyMatchers[Command.REDO](key)) {
|
||||
if (redoStack.length === 0) {
|
||||
return false;
|
||||
}
|
||||
redo();
|
||||
return true;
|
||||
}
|
||||
@@ -3486,6 +3494,8 @@ export function useTextBuffer({
|
||||
visualCursor,
|
||||
visualLines,
|
||||
keyMatchers,
|
||||
undoStack.length,
|
||||
redoStack.length,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user