diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-09-04 21:33:25 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-09-13 07:46:39 +0200 |
commit | 18a3a8982288fc41fd902e412d624071e79fc627 (patch) | |
tree | c84646dc84c4b03b9aba2ce9342158d60e19ff62 /src/nvim/screen.c | |
parent | 4d3ef578e91cb23586979ed50fa0dfddd45ded1d (diff) | |
download | rneovim-18a3a8982288fc41fd902e412d624071e79fc627.tar.gz rneovim-18a3a8982288fc41fd902e412d624071e79fc627.tar.bz2 rneovim-18a3a8982288fc41fd902e412d624071e79fc627.zip |
luahl
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 3c2e1ccaf5..ca1c4589f8 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -639,10 +639,11 @@ bool decorations_active = false; void decorations_add_luahl_attr(int attr_id, int start_row, int start_col, - int end_row, int end_col) + int end_row, int end_col, VirtText *virt_text) { kv_push(decorations.active, - ((HlRange){ start_row, start_col, end_row, end_col, attr_id, NULL })); + ((HlRange){ start_row, start_col, + end_row, end_col, attr_id, virt_text })); } /* @@ -2356,14 +2357,9 @@ win_line ( args.items[2] = INTEGER_OBJ(lnum-1); lua_attr_active = true; extra_check = true; - Object o = nlua_call_ref(buf->b_luahl_line, "line", args, true, &err); + nlua_call_ref(buf->b_luahl_line, "line", args, false, &err); lua_attr_active = false; - if (o.type == kObjectTypeString) { - // TODO(bfredl): this is a bit of a hack. A final API should use an - // "unified" interface where luahl can add both bufhl and virttext - luatext = o.data.string.data; - do_virttext = true; - } else if (ERROR_SET(&err)) { + if (ERROR_SET(&err)) { ELOG("error in luahl line: %s", err.msg); luatext = err.msg; do_virttext = true; |