diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-01-09 12:33:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 12:33:08 +0100 |
commit | fc2cd28547954e64ef429c83733f06fa3ee75d50 (patch) | |
tree | b26abc08bdbc2d97cd207180073af982fa25dab3 /test/functional/ui/float_spec.lua | |
parent | df60ac9767d8b6b4a9959d561d22f1e4f1ac3aa4 (diff) | |
parent | 3a8be82175c3bcc26640ecfe7d13c7d8bdc06632 (diff) | |
download | rneovim-fc2cd28547954e64ef429c83733f06fa3ee75d50.tar.gz rneovim-fc2cd28547954e64ef429c83733f06fa3ee75d50.tar.bz2 rneovim-fc2cd28547954e64ef429c83733f06fa3ee75d50.zip |
Merge pull request #21702 from glepnir/fix_2
fix(api): convert title_pos string in nvim_win_get_config
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index ab87384194..61143e953c 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -1739,6 +1739,28 @@ describe('float window', function() })) end) + it('validate title_pos in nvim_win_get_config', function() + local title_pos = exec_lua([[ + local bufnr = vim.api.nvim_create_buf(false, false) + local opts = { + relative = 'editor', + col = 2, + row = 5, + height = 2, + width = 9, + border = 'double', + title = 'Test', + title_pos = 'center' + } + + local win_id = vim.api.nvim_open_win(bufnr, true, opts) + return vim.api.nvim_win_get_config(win_id).title_pos + ]]) + + eq('center', title_pos) + end) + + it('border with title', function() local buf = meths.create_buf(false, false) meths.buf_set_lines(buf, 0, -1, true, {' halloj! ', |