aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-05-03 15:53:13 +0800
committerglepnir <glephunter@gmail.com>2024-05-25 15:34:29 +0800
commit8b2b1fba2abfb99186e3a1f0123251a3e2eae3fe (patch)
treeaae2b317a3a912e826a9bcd0933af97c95177e81 /runtime
parent4e5c633ed4871a948aff7338b793ac5f93484153 (diff)
downloadrneovim-8b2b1fba2abfb99186e3a1f0123251a3e2eae3fe.tar.gz
rneovim-8b2b1fba2abfb99186e3a1f0123251a3e2eae3fe.tar.bz2
rneovim-8b2b1fba2abfb99186e3a1f0123251a3e2eae3fe.zip
fix(float): missing default highlight for title
Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt6
-rw-r--r--runtime/lua/vim/_meta/api.lua6
2 files changed, 8 insertions, 4 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 86f4c3875c..2ca34150f3 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -3270,13 +3270,15 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()*
<
• title: Title (optional) in window border, string or list.
List should consist of `[text, highlight]` tuples. If
- string, the default highlight group is `FloatTitle`.
+ string, or a tuple lacks a highlight, the default
+ highlight group is `FloatTitle`.
• title_pos: Title position. Must be set with `title`
option. Value can be one of "left", "center", or "right".
Default is `"left"`.
• footer: Footer (optional) in window border, string or
list. List should consist of `[text, highlight]` tuples.
- If string, the default highlight group is `FloatFooter`.
+ If string, or a tuple lacks a highlight, the default
+ highlight group is `FloatFooter`.
• footer_pos: Footer position. Must be set with `footer`
option. Value can be one of "left", "center", or "right".
Default is `"left"`.
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 64c67be076..ae43863316 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -1731,13 +1731,15 @@ function vim.api.nvim_open_term(buffer, opts) end
---
--- • title: Title (optional) in window border, string or list.
--- List should consist of `[text, highlight]` tuples. If
---- string, the default highlight group is `FloatTitle`.
+--- string, or a tuple lacks a highlight, the default
+--- highlight group is `FloatTitle`.
--- • title_pos: Title position. Must be set with `title`
--- option. Value can be one of "left", "center", or "right".
--- Default is `"left"`.
--- • footer: Footer (optional) in window border, string or
--- list. List should consist of `[text, highlight]` tuples.
---- If string, the default highlight group is `FloatFooter`.
+--- If string, or a tuple lacks a highlight, the default
+--- highlight group is `FloatFooter`.
--- • footer_pos: Footer position. Must be set with `footer`
--- option. Value can be one of "left", "center", or "right".
--- Default is `"left"`.