From c1fac11dfaf9d656b7361708d9faab1916eac846 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Mon, 19 Feb 2024 01:27:44 +1100 Subject: feat(fs): `Deno.FsFile.{isTerminal,setRaw}()` (#22234) Closes #22229. --------- Signed-off-by: Asher Gomez --- runtime/ops/tty.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/ops') diff --git a/runtime/ops/tty.rs b/runtime/ops/tty.rs index 40aa28494..e570754f2 100644 --- a/runtime/ops/tty.rs +++ b/runtime/ops/tty.rs @@ -51,7 +51,7 @@ use winapi::um::wincon; deno_core::extension!( deno_tty, ops = [ - op_stdin_set_raw, + op_set_raw, op_is_terminal, op_console_size, op_read_line_prompt @@ -83,12 +83,12 @@ fn mode_raw_input_off(original_mode: DWORD) -> DWORD { } #[op2(fast)] -fn op_stdin_set_raw( +fn op_set_raw( state: &mut OpState, + rid: u32, is_raw: bool, cbreak: bool, ) -> Result<(), AnyError> { - let rid = 0; // stdin is always rid=0 let handle_or_fd = state.resource_table.get_fd(rid)?; // From https://github.com/kkawakam/rustyline/blob/master/src/tty/windows.rs -- cgit v1.2.3