From 7a8d0278bd6bd57e04f61183cb8e2969cf148e3f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 26 May 2019 23:32:06 +0200 Subject: patch 8.1.1407: popup_create() does not support text properties Problem: Popup_create() does not support text properties. Solution: Support the third form of the text argument. --- runtime/doc/popup.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index bbab6d03da..5697edec99 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -279,7 +279,6 @@ optionally text properties. It is in one of three forms: - a string - a list of strings - a list of dictionaries, where each dictionary has these entries: - {not implemented yet} text String with the text to display. props A list of text properties. Optional. Each entry is a dictionary, like the third argument of @@ -369,12 +368,16 @@ outside of the Vim window will not be displayed, thus truncated. POPUP TEXT PROPERTIES *popup-props* -{not implemented yet} -These are similar to the third argument of |prop_add()|, but not exactly the -same, since they only apply to one line. +These are similar to the third argument of |prop_add()| except: +- "lnum" is always the current line in the list +- "bufnr" is always the buffer of the popup +- "col" is in the Dict instead of a separate argument +- "transparent" is extra +So we get: col starting column, counted in bytes, use one for the first column. length length of text in bytes; can be zero + end_lnum line number for the end of the text end_col column just after the text; not used when "length" is present; when {col} and "end_col" are equal, this is a zero-width text property @@ -385,6 +388,7 @@ same, since they only apply to one line. transparent do not show these characters, show the text under it; if there is an border character to the right or below it will be made transparent as well + {not implemented yet} POPUP FILTER *popup-filter* -- cgit v1.2.3