diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-03-23 15:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 15:54:09 +0100 |
commit | ed200898773295e55dd29b57bd6a4b1ada56e03e (patch) | |
tree | eb6bf1c6aae7571a1a830bc3b392956b0328547a /test | |
parent | a1a0bc618f02a61c2964e22015ff73520e1d10d8 (diff) | |
parent | 06c191848bc70f97826832cd1f92736ee6a2c7cc (diff) | |
download | rneovim-ed200898773295e55dd29b57bd6a4b1ada56e03e.tar.gz rneovim-ed200898773295e55dd29b57bd6a4b1ada56e03e.tar.bz2 rneovim-ed200898773295e55dd29b57bd6a4b1ada56e03e.zip |
Merge pull request #14194 from bfredl/provide_virt
memory error with ephemeral virt_text
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 7f4ab3ee5d..295a54aec8 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -302,6 +302,35 @@ describe('decorations providers', function() | ]]} end) + + it('can have virtual text', function() + insert(mulholland) + setup_provider [[ + local hl = a.nvim_get_hl_id_by_name "ErrorMsg" + local test_ns = a.nvim_create_namespace "mulholland" + function on_do(event, ...) + if event == "line" then + local win, buf, line = ... + a.nvim_buf_set_extmark(buf, test_ns, line, 0, { + virt_text = {{'+', 'ErrorMsg'}}; + virt_text_pos='overlay'; + ephemeral = true; + }) + end + end + ]] + + screen:expect{grid=[[ + {2:+}/ just to see if there was an accident | + {2:+}/ on Mulholland Drive | + {2:+}ry_start(); | + {2:+}ufref_T save_buf; | + {2:+}witch_buffer(&save_buf, buf); | + {2:+}osp = getmark(mark, false); | + {2:+}estore_buffer(&save_buf);^ | + | + ]]} + end) end) describe('extmark decorations', function() |