Use tracked terminal mode for native paste

This commit is contained in:
Mohamed Boudra
2026-06-19 11:41:41 +07:00
parent ee92843965
commit ad30f65549

View File

@@ -314,12 +314,7 @@ function NativeTerminalEmulator({
};
const getInputModeState = useCallback((): TerminalInputModeState => {
const trackedState = inputModeTrackerRef.current.getState();
return {
...trackedState,
applicationCursorKeys:
terminalRef.current?.getInputModeState().applicationCursorKeys ?? false,
};
return inputModeTrackerRef.current.getState();
}, []);
const emitInputModeChange = useCallback(() => {
@@ -608,7 +603,7 @@ function NativeTerminalEmulator({
callbacksRef.current.onInput?.(
encodeTerminalPaste({
text,
bracketedPaste: terminalRef.current?.getInputModeState().bracketedPaste ?? false,
bracketedPaste: inputModeTrackerRef.current.getState().bracketedPaste ?? false,
}),
);
},