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.
This commit is contained in:
glepnir
2024-05-03 15:53:13 +08:00
parent 4e5c633ed4
commit 8b2b1fba2a
5 changed files with 27 additions and 22 deletions

View File

@ -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"`.