summaryrefslogtreecommitdiff
path: root/runtime/ops/tty.rs
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-02-19 01:27:44 +1100
committerGitHub <noreply@github.com>2024-02-18 07:27:44 -0700
commitc1fac11dfaf9d656b7361708d9faab1916eac846 (patch)
tree151c729aa2774c21924b0bb8a1c6aa6daffea854 /runtime/ops/tty.rs
parent7abd72a80f0aafe071ad7d298b48e0da741cc9f3 (diff)
feat(fs): `Deno.FsFile.{isTerminal,setRaw}()` (#22234)
Closes #22229. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'runtime/ops/tty.rs')
-rw-r--r--runtime/ops/tty.rs6
1 files changed, 3 insertions, 3 deletions
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