diff options
author | Raphael <glephunter@gmail.com> | 2022-11-07 20:02:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 04:02:00 -0800 |
commit | 3435cdfb94b6f3c72e7f0f16fef9ff2660377cb2 (patch) | |
tree | 02d74b2b517d3edff4e1a195df80c50e35b16883 | |
parent | 31ffc360f2a4aab469a95a55c532f376443bd5fe (diff) | |
download | rneovim-3435cdfb94b6f3c72e7f0f16fef9ff2660377cb2.tar.gz rneovim-3435cdfb94b6f3c72e7f0f16fef9ff2660377cb2.tar.bz2 rneovim-3435cdfb94b6f3c72e7f0f16fef9ff2660377cb2.zip |
refactor(highlight): rename FloatBorderTitle #20988
requested in https://github.com/neovim/neovim/pull/20184
-rw-r--r-- | runtime/doc/api.txt | 2 | ||||
-rw-r--r-- | src/nvim/api/win_config.c | 4 | ||||
-rw-r--r-- | src/nvim/highlight_defs.h | 2 | ||||
-rw-r--r-- | src/nvim/highlight_group.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index e2a5291f7f..f95fd0d36c 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3070,7 +3070,7 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* • title: Title (optional) in window border, String or list. List is [text, highlight] tuples. if is string the default - highlight group is `FloatBorderTitle`. + highlight group is `FloatTitle`. • title_pos: Title position must set with title option. value can be of `left` `center` `right` default is left. • noautocmd: If true then no buffer-related autocommand diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c index 9f15e5a85b..648048e970 100644 --- a/src/nvim/api/win_config.c +++ b/src/nvim/api/win_config.c @@ -139,7 +139,7 @@ /// [ {"+", "MyCorner"}, {"x", "MyBorder"} ]. /// - title: Title (optional) in window border, String or list. /// List is [text, highlight] tuples. if is string the default -/// highlight group is `FloatBorderTitle`. +/// highlight group is `FloatTitle`. /// - title_pos: Title position must set with title option. /// value can be of `left` `center` `right` default is left. /// - noautocmd: If true then no buffer-related autocommand events such as @@ -364,7 +364,7 @@ static void parse_border_title(Object title, Object title_pos, FloatConfig *fcon fconfig->title = false; return; } - int hl_id = syn_check_group(S_LEN("FloatBorderTitle")); + int hl_id = syn_check_group(S_LEN("FloatTitle")); kv_push(fconfig->title_chunks, ((VirtTextChunk){ .text = xstrdup(title.data.string.data), .hl_id = hl_id })); fconfig->title_width = (int)mb_string2cells(title.data.string.data); diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index d66bcca57f..2557a248c3 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -179,7 +179,7 @@ EXTERN const char *hlf_names[] INIT(= { [HLF_WBR] = "WinBar", [HLF_WBRNC] = "WinBarNC", [HLF_CU] = "Cursor", - [HLF_BTITLE] = "FloatBorderTitle", + [HLF_BTITLE] = "FloatTitle", }); EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context. diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index a83f4ea969..97debc95a8 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -131,7 +131,7 @@ static const char *highlight_init_both[] = { "default link MsgSeparator StatusLine", "default link NormalFloat Pmenu", "default link FloatBorder WinSeparator", - "default link FloatBorderTitle Title", + "default link FloatTitle Title", "default FloatShadow blend=80 guibg=Black", "default FloatShadowThrough blend=100 guibg=Black", "RedrawDebugNormal cterm=reverse gui=reverse", |