comparison src/if_py_both.h @ 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 b4ce0e1fb5a6
children a35752526cd0
comparison
equal deleted inserted replaced
6175:e75a30a4578e 6176:85a1802ae810
4194 { 4194 {
4195 RAISE_DELETE_LINE_FAIL; 4195 RAISE_DELETE_LINE_FAIL;
4196 break; 4196 break;
4197 } 4197 }
4198 } 4198 }
4199 if (buf == curbuf) 4199 if (buf == curbuf && (save_curwin != NULL || save_curbuf == NULL))
4200 /* Using an existing window for the buffer, adjust the cursor
4201 * position. */
4200 py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); 4202 py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n);
4201 if (save_curbuf == NULL) 4203 if (save_curbuf == NULL)
4202 /* Only adjust marks if we managed to switch to a window that 4204 /* Only adjust marks if we managed to switch to a window that
4203 * holds the buffer, otherwise line numbers will be invalid. */ 4205 * holds the buffer, otherwise line numbers will be invalid. */
4204 deleted_lines_mark((linenr_T)lo, (long)i); 4206 deleted_lines_mark((linenr_T)lo, (long)i);