aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/extmark.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-05-22 14:16:42 +0200
committerGitHub <noreply@github.com>2023-05-22 14:16:42 +0200
commit07883940b2294e0ab32fb58e6624d18d9dd1715a (patch)
tree2ce3b16ad7b6e96a4141a8502a3c667071ebf814 /src/nvim/api/extmark.c
parentcb34d0ddd086141d6afcb9c48eae180abbeffecc (diff)
parent6eeb28845a930fbfe128dc3edc7969b0d9b2ed1c (diff)
downloadrneovim-07883940b2294e0ab32fb58e6624d18d9dd1715a.tar.gz
rneovim-07883940b2294e0ab32fb58e6624d18d9dd1715a.tar.bz2
rneovim-07883940b2294e0ab32fb58e6624d18d9dd1715a.zip
Merge pull request #20130 from bfredl/inline
feat(ui): inline virtual text
Diffstat (limited to 'src/nvim/api/extmark.c')
-rw-r--r--src/nvim/api/extmark.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index d6f0288f94..dd256a54f0 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -477,6 +477,8 @@ Array nvim_buf_get_extmarks(Buffer buffer, Integer ns_id, Object start, Object e
/// - "overlay": display over the specified column, without
/// shifting the underlying text.
/// - "right_align": display right aligned in the window.
+/// - "inline": display at the specified column, and
+/// shift the buffer text to the right as needed
/// - virt_text_win_col : position the virtual text at a fixed
/// window column (starting from the first
/// text column)
@@ -695,6 +697,8 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
decor.virt_text_pos = kVTOverlay;
} else if (strequal("right_align", str.data)) {
decor.virt_text_pos = kVTRightAlign;
+ } else if (strequal("inline", str.data)) {
+ decor.virt_text_pos = kVTInline;
} else {
VALIDATE_S(false, "virt_text_pos", "", {
goto error;