comparison src/if_py_both.h @ 20599:d571231175b4 v8.2.0853

patch 8.2.0853: ml_delete() often called with FALSE argument Commit: https://github.com/vim/vim/commit/ca70c07b72c24aae3d141e67d08f50361f051af5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 30 20:30:46 2020 +0200 patch 8.2.0853: ml_delete() often called with FALSE argument Problem: ml_delete() often called with FALSE argument. Solution: Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 May 2020 20:45:03 +0200
parents 4c317d8c1051
children cc4914752841
comparison
equal deleted inserted replaced
20598:d14c5a4a8dfa 20599:d571231175b4
4397 4397
4398 VimTryStart(); 4398 VimTryStart();
4399 4399
4400 if (u_savedel((linenr_T)n, 1L) == FAIL) 4400 if (u_savedel((linenr_T)n, 1L) == FAIL)
4401 RAISE_UNDO_FAIL; 4401 RAISE_UNDO_FAIL;
4402 else if (ml_delete((linenr_T)n, FALSE) == FAIL) 4402 else if (ml_delete((linenr_T)n) == FAIL)
4403 RAISE_DELETE_LINE_FAIL; 4403 RAISE_DELETE_LINE_FAIL;
4404 else 4404 else
4405 { 4405 {
4406 if (buf == curbuf && (save_curwin != NULL 4406 if (buf == curbuf && (save_curwin != NULL
4407 || save_curbuf.br_buf == NULL)) 4407 || save_curbuf.br_buf == NULL))
4510 RAISE_UNDO_FAIL; 4510 RAISE_UNDO_FAIL;
4511 else 4511 else
4512 { 4512 {
4513 for (i = 0; i < n; ++i) 4513 for (i = 0; i < n; ++i)
4514 { 4514 {
4515 if (ml_delete((linenr_T)lo, FALSE) == FAIL) 4515 if (ml_delete((linenr_T)lo) == FAIL)
4516 { 4516 {
4517 RAISE_DELETE_LINE_FAIL; 4517 RAISE_DELETE_LINE_FAIL;
4518 break; 4518 break;
4519 } 4519 }
4520 } 4520 }
4586 // need to delete some old_len. We do this at the start, by 4586 // need to delete some old_len. We do this at the start, by
4587 // repeatedly deleting line "lo". 4587 // repeatedly deleting line "lo".
4588 if (!PyErr_Occurred()) 4588 if (!PyErr_Occurred())
4589 { 4589 {
4590 for (i = 0; i < old_len - new_len; ++i) 4590 for (i = 0; i < old_len - new_len; ++i)
4591 if (ml_delete((linenr_T)lo, FALSE) == FAIL) 4591 if (ml_delete((linenr_T)lo) == FAIL)
4592 { 4592 {
4593 RAISE_DELETE_LINE_FAIL; 4593 RAISE_DELETE_LINE_FAIL;
4594 break; 4594 break;
4595 } 4595 }
4596 extra -= i; 4596 extra -= i;