diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-11-16 11:03:43 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-16 11:03:43 +0100 |
commit | 6222cca36adbf09109987e27e58d025a00020f3a (patch) | |
tree | 6deb657382b72b5cda5eaafbd9ceef0e808af62e | |
parent | e3b08a0fc43eef91b51f8166a036e86b5bdf5613 (diff) | |
download | rneovim-6222cca36adbf09109987e27e58d025a00020f3a.tar.gz rneovim-6222cca36adbf09109987e27e58d025a00020f3a.tar.bz2 rneovim-6222cca36adbf09109987e27e58d025a00020f3a.zip |
undo: delete undo_off global without effect
-rw-r--r-- | src/nvim/getchar.c | 1 | ||||
-rw-r--r-- | src/nvim/globals.h | 1 | ||||
-rw-r--r-- | src/nvim/undo.c | 15 |
3 files changed, 0 insertions, 17 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 399f0671b4..c038977127 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -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. diff --git a/src/nvim/globals.h b/src/nvim/globals.h index c3d1a4d40b..227119bcee 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -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 diff --git a/src/nvim/undo.c b/src/nvim/undo.c index b00d2d505f..b36d1ac3ec 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -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(); |