aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_extui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/_extui.lua')
-rw-r--r--runtime/lua/vim/_extui.lua23
1 files changed, 14 insertions, 9 deletions
diff --git a/runtime/lua/vim/_extui.lua b/runtime/lua/vim/_extui.lua
index 8b3f67076e..99a3dfa307 100644
--- a/runtime/lua/vim/_extui.lua
+++ b/runtime/lua/vim/_extui.lua
@@ -17,6 +17,19 @@
--- },
---})
---```
+---
+---There are four separate window types used by this interface:
+---- "cmd": The cmdline window; also used for 'showcmd', 'showmode', 'ruler', and
+--- messages if 'cmdheight' > 0.
+---- "box": The message box window; used for messages when 'cmdheight' == 0.
+---- "more": The more-prompt window; used for |:messages| and certain messages
+--- that should be shown in full.
+---- "prompt": The cmdline prompt window; used for prompt messages that expect
+--- user input.
+---
+---These four windows are assigned the "cmdline", "msgbox", "msgmore" and
+---"msgprompt" 'filetype' respectively. Use a |FileType| autocommand to configure
+---any local options for these windows and their respective buffers.
local api = vim.api
local ext = require('vim._extui.shared')
@@ -90,24 +103,17 @@ function M.enable(opts)
ext.msg.prev_msg = ''
end
ext.cmdheight = value
- elseif name == 'termguicolors' then
- -- 'termguicolors' toggled; add or remove border and set 'winblend' for box windows.
- for _, tab in ipairs(api.nvim_list_tabpages()) do
- api.nvim_win_set_config(ext.wins[tab].box, { border = value and 'none' or 'single' })
- vim.wo[ext.wins[tab].box].winblend = value and 30 or 0
- end
end
end
if vim.v.vim_did_enter == 1 then
ext.tab_check_wins()
check_opt('cmdheight', vim.o.cmdheight)
- check_opt('termguicolors', vim.o.termguicolors)
end
api.nvim_create_autocmd('OptionSet', {
group = ext.augroup,
- pattern = { 'cmdheight', 'termguicolors' },
+ pattern = { 'cmdheight' },
callback = function(ev)
ext.tab_check_wins()
check_opt(ev.match, vim.v.option_new)
@@ -122,7 +128,6 @@ function M.enable(opts)
ext.tab_check_wins()
if ev.event == 'VimEnter' then
check_opt('cmdheight', vim.o.cmdheight)
- check_opt('termguicolors', vim.o.termguicolors)
end
ext.msg.set_pos()
end,