Mercurial > vim
changeset 6176:85a1802ae810 v7.4.424
updated for version 7.4.424
Problem: Get ml_get error when using Python to delete lines in a buffer
that is not in a window. issue 248.
Solution: Do not try adjusting the cursor for a different buffer.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 29 Aug 2014 13:49:52 +0200 |
parents | e75a30a4578e |
children | 4b2b0537aef7 |
files | src/if_py_both.h src/version.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -4196,7 +4196,9 @@ SetBufferLineList( break; } } - if (buf == curbuf) + if (buf == curbuf && (save_curwin != NULL || save_curbuf == NULL)) + /* Using an existing window for the buffer, adjust the cursor + * position. */ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); if (save_curbuf == NULL) /* Only adjust marks if we managed to switch to a window that