Skip to content

Commit c57d9ae

Browse files
committed
make vim-ipython buffer always modifiable
this fixes a bug which prevented from modifying the 'vim-ipython' buffer if it was first invoked from a buffer that was readonly - such as the vim help buffers.
1 parent 9655d4b commit c57d9ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ftplugin/python/ipy.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def update_subchannel_msgs(debug=False):
205205
"try"
206206
"|silent! wincmd P"
207207
"|catch /^Vim\%((\a\+)\)\=:E441/"
208-
"|silent pedit vim-ipython"
208+
"|silent pedit +set\ ma vim-ipython"
209209
"|silent! wincmd P"
210210
"|endtry")
211211
# if the current window is called 'vim-ipython'
@@ -215,8 +215,8 @@ def update_subchannel_msgs(debug=False):
215215
else:
216216
# close preview window, it was something other than 'vim-ipython'
217217
vim.command("pcl")
218-
vim.command("silent pedit vim-ipython")
219-
vim.command("normal P") #switch to preview window
218+
vim.command("silent pedit +set\ ma vim-ipython")
219+
vim.command("wincmd P") #switch to preview window
220220
# subchannel window quick quit key 'q'
221221
vim.command('map <buffer> q :q<CR>')
222222
vim.command("set bufhidden=hide buftype=nofile ft=python")

0 commit comments

Comments
 (0)