@@ -35,7 +35,7 @@ function popup.create(what, vim_options)
35
35
if type (what ) == ' number' then
36
36
bufnr = what
37
37
else
38
- bufnr = vim .fn .nvim_create_buf (false , true )
38
+ bufnr = vim .api .nvim_create_buf (false , true )
39
39
assert (bufnr , " Failed to create buffer" )
40
40
41
41
-- TODO: Handle list of lines
@@ -83,7 +83,7 @@ function popup.create(what, vim_options)
83
83
end
84
84
end
85
85
86
- vim .fn .nvim_buf_set_lines (bufnr , 0 , - 1 , true , what )
86
+ vim .api .nvim_buf_set_lines (bufnr , 0 , - 1 , true , what )
87
87
end
88
88
89
89
local option_defaults = {
@@ -190,7 +190,7 @@ function popup.create(what, vim_options)
190
190
if should_enter == nil then
191
191
should_enter = true
192
192
end
193
- win_id = vim .fn .nvim_open_win (bufnr , should_enter , win_opts )
193
+ win_id = vim .api .nvim_open_win (bufnr , should_enter , win_opts )
194
194
end
195
195
196
196
@@ -222,11 +222,11 @@ function popup.create(what, vim_options)
222
222
223
223
-- Buffer Options
224
224
if vim_options .cursorline then
225
- vim .fn .nvim_win_set_option (win_id , ' cursorline' , true )
225
+ vim .api .nvim_win_set_option (win_id , ' cursorline' , true )
226
226
end
227
227
228
228
if vim_options .wrap ~= nil then
229
- vim .fn .nvim_win_set_option (win_id , ' wrap' , vim_options .wrap )
229
+ vim .api .nvim_win_set_option (win_id , ' wrap' , vim_options .wrap )
230
230
end
231
231
232
232
-- ===== Not Implemented Options =====
0 commit comments