summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 6195ad51d..2e99a8598 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4729,11 +4729,11 @@ f_term_getcursor(typval_T *argvars, typval_T *rettv)
d = dict_alloc();
if (d != NULL)
{
- dict_add_nr_str(d, "visible", term->tl_cursor_visible, NULL);
- dict_add_nr_str(d, "blink", blink_state_is_inverted()
- ? !term->tl_cursor_blink : term->tl_cursor_blink, NULL);
- dict_add_nr_str(d, "shape", term->tl_cursor_shape, NULL);
- dict_add_nr_str(d, "color", 0L, cursor_color_get(term->tl_cursor_color));
+ dict_add_number(d, "visible", term->tl_cursor_visible);
+ dict_add_number(d, "blink", blink_state_is_inverted()
+ ? !term->tl_cursor_blink : term->tl_cursor_blink);
+ dict_add_number(d, "shape", term->tl_cursor_shape);
+ dict_add_string(d, "color", cursor_color_get(term->tl_cursor_color));
list_append_dict(l, d);
}
}
@@ -5059,18 +5059,17 @@ f_term_scrape(typval_T *argvars, typval_T *rettv)
break;
list_append_dict(l, dcell);
- dict_add_nr_str(dcell, "chars", 0, mbs);
+ dict_add_string(dcell, "chars", mbs);
vim_snprintf((char *)rgb, 8, "#%02x%02x%02x",
fg.red, fg.green, fg.blue);
- dict_add_nr_str(dcell, "fg", 0, rgb);
+ dict_add_string(dcell, "fg", rgb);
vim_snprintf((char *)rgb, 8, "#%02x%02x%02x",
bg.red, bg.green, bg.blue);
- dict_add_nr_str(dcell, "bg", 0, rgb);
+ dict_add_string(dcell, "bg", rgb);
- dict_add_nr_str(dcell, "attr",
- cell2attr(attrs, fg, bg), NULL);
- dict_add_nr_str(dcell, "width", width, NULL);
+ dict_add_number(dcell, "attr", cell2attr(attrs, fg, bg));
+ dict_add_number(dcell, "width", width);
++pos.col;
if (width == 2)