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:
Lewis Russell
2022-12-19 16:37:45 +00:00
committed by Famiu Haque
parent e3e6fadfd8
commit 1fe1bb084d
87 changed files with 725 additions and 785 deletions

View File

@@ -415,7 +415,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('opening lines', function()
local check_events = setup_eventcheck(verify, origlines)
-- meths.buf_set_option(0, 'autoindent', true)
-- meths.set_option_value('autoindent', true, { buf = 0 })
feed 'Go'
check_events {
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 1 };
@@ -428,7 +428,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('opening lines with autoindent', function()
local check_events = setup_eventcheck(verify, origlines)
meths.buf_set_option(0, 'autoindent', true)
meths.set_option_value('autoindent', true, { buf = 0 })
feed 'Go'
check_events {
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 5 };
@@ -462,8 +462,8 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('continuing comments with fo=or', function()
local check_events = setup_eventcheck(verify, {'// Comment'})
meths.buf_set_option(0, 'formatoptions', 'ro')
meths.buf_set_option(0, 'filetype', 'c')
meths.set_option_value('formatoptions', 'ro', { buf = 0 })
meths.set_option_value('filetype', 'c', { buf = 0 })
feed 'A<CR>'
check_events {
{ "test1", "bytes", 1, 4, 0, 10, 10, 0, 0, 0, 1, 3, 4 };
@@ -603,7 +603,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('inccomand=nosplit and substitute', function()
local check_events = setup_eventcheck(verify,
{"abcde", "12345"})
meths.set_option('inccommand', 'nosplit')
meths.set_option_value('inccommand', 'nosplit', {})
-- linewise substitute
feed(':%s/bcd/')
@@ -998,7 +998,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it("virtual edit", function ()
local check_events = setup_eventcheck(verify, { "", " " })
meths.set_option("virtualedit", "all")
meths.set_option_value('virtualedit', "all", {})
feed [[<Right><Right>iab<ESC>]]