mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
man.lua: avoid float conversion on lua 5.3 (#7851)
Error detected while processing function man#open_page[58]..<SNR>54_put_page: line 8: E5105: Error while calling lua chunk: /usr/share/nvim/runtime/lua/man.lua:165: Vim(let):E805: Using a Float as a Number
This commit is contained in:
parent
9ddeb6e187
commit
423d7af3df
@ -148,8 +148,8 @@ local function highlight_line(line, linenr)
|
||||
end
|
||||
|
||||
local function highlight_man_page()
|
||||
local mod = vim.api.nvim_eval("&modifiable")
|
||||
vim.api.nvim_command("set modifiable")
|
||||
local mod = vim.api.nvim_buf_get_option(0, "modifiable")
|
||||
vim.api.nvim_buf_set_option(0, "modifiable", true)
|
||||
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
for i, line in ipairs(lines) do
|
||||
@ -162,7 +162,7 @@ local function highlight_man_page()
|
||||
end
|
||||
buf_hls = {}
|
||||
|
||||
vim.api.nvim_command("let &modifiable = "..mod)
|
||||
vim.api.nvim_buf_set_option(0, "modifiable", mod)
|
||||
end
|
||||
|
||||
return { highlight_man_page = highlight_man_page }
|
||||
|
Loading…
Reference in New Issue
Block a user