aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/tutor.vim3
-rw-r--r--runtime/lua/man.lua6
-rw-r--r--src/nvim/api/buffer.c2
3 files changed, 4 insertions, 7 deletions
diff --git a/runtime/autoload/tutor.vim b/runtime/autoload/tutor.vim
index 56e2283465..0f01190b9b 100644
--- a/runtime/autoload/tutor.vim
+++ b/runtime/autoload/tutor.vim
@@ -2,9 +2,6 @@
" Setup: {{{1
function! tutor#SetupVim()
- if &columns < 90
- set columns=90
- endif
if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
filetype plugin on
endif
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
index baa522f343..b0fbe9cc35 100644
--- a/runtime/lua/man.lua
+++ b/runtime/lua/man.lua
@@ -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 }
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index fdde28f2bb..01dde9dd09 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -806,7 +806,7 @@ Integer nvim_buf_add_highlight(Buffer buffer,
/// Clears highlights from a given source group and a range of lines
///
-/// To clear a source group in the entire buffer, pass in 1 and -1 to
+/// To clear a source group in the entire buffer, pass in 0 and -1 to
/// line_start and line_end respectively.
///
/// @param buffer Buffer handle