From 67d679e7351a6b18ae0a6916e60c042cb100a239 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Feb 2020 18:34:10 +0100 Subject: [PATCH] nvim: Fix a build error in term_settermprop() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/nvim/terminal.c:709:34: error: incompatible type for argument 2 of ‘buf_set_term_title’ 709 | buf_set_term_title(buf, val->string); | ~~~^~~~~~~~ | | | VTermStringFragment {aka struct } --- src/nvim/terminal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index c5e756905a9..53cd0c1cc6c 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -677,13 +677,13 @@ static int term_movecursor(VTermPos new, VTermPos old, int visible, return 1; } -static void buf_set_term_title(buf_T *buf, char *title) +static void buf_set_term_title(buf_T *buf, const char *title) FUNC_ATTR_NONNULL_ALL { Error err = ERROR_INIT; dict_set_var(buf->b_vars, STATIC_CSTR_AS_STRING("term_title"), - STRING_OBJ(cstr_as_string(title)), + STRING_OBJ(cstr_as_string((char *)title)), /* discard_const */ false, false, &err); @@ -706,7 +706,7 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *data) case VTERM_PROP_TITLE: { buf_T *buf = handle_get_buffer(term->buf_handle); - buf_set_term_title(buf, val->string); + buf_set_term_title(buf, val->string.str); break; }