Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 41bd11a

Browse files
committed
fix(nvim-plug): fix buf modifiable opt
1 parent 7d3c1c9 commit 41bd11a

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

bundle/nvim-plug/lua/plug/ui.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ M.open = function()
9999
end
100100
if vim.api.nvim_buf_is_valid(bufnr) then
101101
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
102+
vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr})
102103
end
103104
--- setup highlight
104105
if vim.fn.hlexists('PlugTitle') == 0 then
@@ -128,7 +129,9 @@ end
128129
M.on_update = function(name, data)
129130
plugin_status[name] = vim.tbl_deep_extend('force', plugin_status[name] or {}, data)
130131
if vim.api.nvim_buf_is_valid(bufnr) then
132+
vim.api.nvim_set_option_value('modifiable', true, { buf = bufnr})
131133
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, build_context())
134+
vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr})
132135
end
133136
end
134137

bundle/nvim-plug/test/init.lua

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,8 @@
55
-- License: GPLv3
66
--=============================================================================
77

8-
if vim.fn.isdirectory('D:/bundle_dir/wsdjeg/nvim-plug') == 0 then
9-
vim.fn.system({
10-
'git',
11-
'clone',
12-
'--depth',
13-
'1',
14-
'https://github.com/wsdjeg/nvim-plug.git',
15-
'D:/bundle_dir/wsdjeg/nvim-plug',
16-
})
17-
end
18-
vim.opt.runtimepath:append('D:/bundle_dir/wsdjeg/nvim-plug')
8+
vim.opt.runtimepath:append('.')
9+
vim.opt.runtimepath:append('~/.SpaceVim')
1910

2011
require('plug').setup({
2112

@@ -42,10 +33,6 @@ require('plug').add({
4233
'wsdjeg/git.vim',
4334
cmds = { 'Git' },
4435
},
45-
{
46-
'wsdjeg/nvim-plug',
47-
fetch = true,
48-
},
4936
{
5037
'wsdjeg/JavaUnit.vim',
5138
cmds = { 'JavaUnit' },

0 commit comments

Comments
 (0)