mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
refactor(api): nvim_win_xx_ns are EXPERIMENTAL
Problem:
The nvim_win_xx_ns function family introduced in ba0370b1d7
needs more bake-time. Currently it's narrowly defined for windows, but
other scopes ("buffer") and features are likely in the future.
Solution:
- Rename the API with double-underscore to mark it as EXPERIMENTAL.
TODO/FUTURE:
- Rename and change the signature to support more than just "window"
scope, and for other flexibility.
- Open question: we could choose either:
- "store scopes on namespaces", or
- "store namespaces on scopes (w:/b:/…)"
This commit is contained in:
@@ -43,9 +43,9 @@ describe('vim.highlight.on_yank', function()
|
||||
vim.api.nvim_buf_set_mark(0,"]",1,1,{})
|
||||
vim.highlight.on_yank({timeout = math.huge, on_macro = true, event = {operator = "y"}})
|
||||
]])
|
||||
neq({}, api.nvim_win_get_ns(0))
|
||||
neq({}, api.nvim__win_get_ns(0))
|
||||
command('wincmd w')
|
||||
eq({}, api.nvim_win_get_ns(0))
|
||||
eq({}, api.nvim__win_get_ns(0))
|
||||
end)
|
||||
|
||||
it('removes old highlight if new one is created before old one times out', function()
|
||||
@@ -55,7 +55,7 @@ describe('vim.highlight.on_yank', function()
|
||||
vim.api.nvim_buf_set_mark(0,"]",1,1,{})
|
||||
vim.highlight.on_yank({timeout = math.huge, on_macro = true, event = {operator = "y"}})
|
||||
]])
|
||||
neq({}, api.nvim_win_get_ns(0))
|
||||
neq({}, api.nvim__win_get_ns(0))
|
||||
command('wincmd w')
|
||||
exec_lua([[
|
||||
vim.api.nvim_buf_set_mark(0,"[",1,1,{})
|
||||
@@ -63,6 +63,6 @@ describe('vim.highlight.on_yank', function()
|
||||
vim.highlight.on_yank({timeout = math.huge, on_macro = true, event = {operator = "y"}})
|
||||
]])
|
||||
command('wincmd w')
|
||||
eq({}, api.nvim_win_get_ns(0))
|
||||
eq({}, api.nvim__win_get_ns(0))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user