undo: delete undo_off global without effect

This commit is contained in:
Björn Linse 2019-11-16 11:03:43 +01:00
parent e3b08a0fc4
commit 6222cca36a
3 changed files with 0 additions and 17 deletions

View File

@ -2409,7 +2409,6 @@ int inchar(
did_outofmem_msg = FALSE; /* display out of memory message (again) */
did_swapwrite_msg = FALSE; /* display swap file write error again */
}
undo_off = FALSE; /* restart undo now */
// Get a character from a script file if there is one.
// If interrupted: Stop reading script files, close them all.

View File

@ -768,7 +768,6 @@ EXTERN int did_outofmem_msg INIT(= false);
// set after out of memory msg
EXTERN int did_swapwrite_msg INIT(= false);
// set after swap write error msg
EXTERN int undo_off INIT(= false); // undo switched off for now
EXTERN int global_busy INIT(= 0); // set when :global is executing
EXTERN int listcmd_busy INIT(= false); // set when :argdo, :windo or
// :bufdo is executing

View File

@ -225,9 +225,6 @@ int u_save_cursor(void)
*/
int u_save(linenr_T top, linenr_T bot)
{
if (undo_off)
return OK;
if (top >= bot || bot > (curbuf->b_ml.ml_line_count + 1)) {
return FAIL; /* rely on caller to do error messages */
}
@ -246,9 +243,6 @@ int u_save(linenr_T top, linenr_T bot)
*/
int u_savesub(linenr_T lnum)
{
if (undo_off)
return OK;
return u_savecommon(lnum - 1, lnum + 1, lnum + 1, FALSE);
}
@ -260,9 +254,6 @@ int u_savesub(linenr_T lnum)
*/
int u_inssub(linenr_T lnum)
{
if (undo_off)
return OK;
return u_savecommon(lnum - 1, lnum, lnum + 1, FALSE);
}
@ -275,9 +266,6 @@ int u_inssub(linenr_T lnum)
*/
int u_savedel(linenr_T lnum, long nlines)
{
if (undo_off)
return OK;
return u_savecommon(lnum - 1, lnum + nlines,
nlines == curbuf->b_ml.ml_line_count ? 2 : lnum, FALSE);
}
@ -2925,9 +2913,6 @@ void u_undoline(void)
colnr_T t;
char_u *oldp;
if (undo_off)
return;
if (curbuf->b_u_line_ptr == NULL
|| curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count) {
beep_flush();