mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
refactor(options): deprecate nvim[_buf|_win]_[gs]et_option
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
This commit is contained in:
committed by
Famiu Haque
parent
e3e6fadfd8
commit
1fe1bb084d
@@ -265,8 +265,8 @@ describe('ui/cursor', function()
|
||||
}
|
||||
|
||||
-- Another cursor style.
|
||||
meths.set_option('guicursor', 'n-v-c:ver35-blinkwait171-blinkoff172-blinkon173'
|
||||
..',ve:hor35,o:ver50,i-ci:block,r-cr:hor90,sm:ver42')
|
||||
meths.set_option_value('guicursor', 'n-v-c:ver35-blinkwait171-blinkoff172-blinkon173'
|
||||
..',ve:hor35,o:ver50,i-ci:block,r-cr:hor90,sm:ver42', {})
|
||||
screen:expect(function()
|
||||
local named = {}
|
||||
for _, m in ipairs(screen._mode_info) do
|
||||
@@ -288,7 +288,7 @@ describe('ui/cursor', function()
|
||||
end)
|
||||
|
||||
-- If there is no setting for guicursor, it becomes the default setting.
|
||||
meths.set_option('guicursor', 'n:ver35-blinkwait171-blinkoff172-blinkon173-Cursor/lCursor')
|
||||
meths.set_option_value('guicursor', 'n:ver35-blinkwait171-blinkoff172-blinkon173-Cursor/lCursor', {})
|
||||
screen:expect(function()
|
||||
for _,m in ipairs(screen._mode_info) do
|
||||
if m.name ~= 'normal' then
|
||||
@@ -304,7 +304,7 @@ describe('ui/cursor', function()
|
||||
end)
|
||||
|
||||
it("empty 'guicursor' sets cursor_shape=block in all modes", function()
|
||||
meths.set_option('guicursor', '')
|
||||
meths.set_option_value('guicursor', '', {})
|
||||
screen:expect(function()
|
||||
-- Empty 'guicursor' sets enabled=false.
|
||||
eq(false, screen._cursor_style_enabled)
|
||||
|
||||
Reference in New Issue
Block a user