diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-08-29 13:49:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-08-29 13:49:52 +0200 |
commit | d7408fa0ceb7bf414ca5c17f8ae3bc13131b7b15 (patch) | |
tree | e6fb94ad6347f962aa49bb541f9e238cdbc24d7d /src | |
parent | e4df164692fef1a3c94149e1e2af68d44d335bf9 (diff) | |
download | vim-d7408fa0ceb7bf414ca5c17f8ae3bc13131b7b15.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/if_py_both.h | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index bf5ea4cf3..5044afbef 100644 --- 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 diff --git a/src/version.c b/src/version.c index d8ed2a03a..a3e113961 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 424, +/**/ 423, /**/ 422, |