+11
-1
lines changedFilter options
+11
-1
lines changed Original file line number Diff line number Diff line change
@@ -116,7 +116,17 @@ void TTYWrap::SetRawMode(const FunctionCallbackInfo<Value>& args) {
116
116
TTYWrap* wrap;
117
117
ASSIGN_OR_RETURN_UNWRAP(
118
118
&wrap, args.This(), args.GetReturnValue().Set(UV_EBADF));
119
-
int err = uv_tty_set_mode(&wrap->handle_, args[0]->IsTrue());
119
+
// UV_TTY_MODE_RAW_VT is a variant of UV_TTY_MODE_RAW that
120
+
// enables control sequence processing on the TTY implementer side,
121
+
// rather than having libuv translate keypress events into
122
+
// control sequences, aligning behavior more closely with
123
+
// POSIX platforms. This is also required to support some control
124
+
// sequences at all on Windows, such as bracketed paste mode.
125
+
// The Node.js readline implementation handles differences between
126
+
// these modes.
127
+
int err = uv_tty_set_mode(
128
+
&wrap->handle_,
129
+
args[0]->IsTrue() ? UV_TTY_MODE_RAW_VT : UV_TTY_MODE_NORMAL);
120
130
args.GetReturnValue().Set(err);
121
131
}
122
132
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4