aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index a52d7493e3..2f3d527b9e 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -985,6 +985,7 @@ fail:
/// as a "\r", not as a "\n". |textlock| applies. It is possible
/// to call |nvim_chan_send()| directly in the callback however.
/// ["input", term, bufnr, data]
+/// - force_crlf: (boolean, default true) Convert "\n" to "\r\n".
/// @param[out] err Error details, if any
/// @return Channel id, or 0 on error
Integer nvim_open_term(Buffer buffer, Dict(open_term) *opts, Error *err)
@@ -1002,7 +1003,6 @@ Integer nvim_open_term(Buffer buffer, Dict(open_term) *opts, Error *err)
}
LuaRef cb = LUA_NOREF;
-
if (HAS_KEY(opts, open_term, on_input)) {
cb = opts->on_input;
opts->on_input = LUA_NOREF;
@@ -1020,6 +1020,7 @@ Integer nvim_open_term(Buffer buffer, Dict(open_term) *opts, Error *err)
.write_cb = term_write,
.resize_cb = term_resize,
.close_cb = term_close,
+ .force_crlf = GET_BOOL_OR_TRUE(opts, open_term, force_crlf),
};
channel_incref(chan);
terminal_open(&chan->term, buf, topts);