*How to reproduce the problem:*
Step 1) Create one additional buffer (in .vimrc)
let nr = bufnr('scratchpad',1)
call setbufvar(nr,'&buftype','nofile')
call setbufvar(nr,'&bufhidden','hide')
call setbufvar(nr,'&buflisted','1')
Step 2) create plugin python file (example_error.py)
import vim
def myprint():
vim.buffers[1].append('hello')
My scratchpad buffer is number 2 in vim, 1 in python
Step 3) open vim, modify contents (do not save) and run
:python example_error.myprint()
In such case current buffer is modified, not the my test scratchpad buffer
Step 3a) open vim, do not modify current unnamed buffer and run
:python example_error.myprint()
also current buffer is modified , not test scratchpad buffer
*Where is this problem in source code?*
File:
- if_py_both.h
Function:
- InsertBufferLines
function is incorrectly implemented
On specified conditions function inserts lines into incorrect buffer
(current buffer is used, which is incorrect. No exception nor no error
is raised, which is incorrect).
Thanks,
Peter
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php