mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
undo: delete undo_off global without effect
This commit is contained in:
@@ -2409,7 +2409,6 @@ int inchar(
|
|||||||
did_outofmem_msg = FALSE; /* display out of memory message (again) */
|
did_outofmem_msg = FALSE; /* display out of memory message (again) */
|
||||||
did_swapwrite_msg = FALSE; /* display swap file write error 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.
|
// Get a character from a script file if there is one.
|
||||||
// If interrupted: Stop reading script files, close them all.
|
// If interrupted: Stop reading script files, close them all.
|
||||||
|
@@ -768,7 +768,6 @@ EXTERN int did_outofmem_msg INIT(= false);
|
|||||||
// set after out of memory msg
|
// set after out of memory msg
|
||||||
EXTERN int did_swapwrite_msg INIT(= false);
|
EXTERN int did_swapwrite_msg INIT(= false);
|
||||||
// set after swap write error msg
|
// 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 global_busy INIT(= 0); // set when :global is executing
|
||||||
EXTERN int listcmd_busy INIT(= false); // set when :argdo, :windo or
|
EXTERN int listcmd_busy INIT(= false); // set when :argdo, :windo or
|
||||||
// :bufdo is executing
|
// :bufdo is executing
|
||||||
|
@@ -225,9 +225,6 @@ int u_save_cursor(void)
|
|||||||
*/
|
*/
|
||||||
int u_save(linenr_T top, linenr_T bot)
|
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)) {
|
if (top >= bot || bot > (curbuf->b_ml.ml_line_count + 1)) {
|
||||||
return FAIL; /* rely on caller to do error messages */
|
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)
|
int u_savesub(linenr_T lnum)
|
||||||
{
|
{
|
||||||
if (undo_off)
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
return u_savecommon(lnum - 1, lnum + 1, lnum + 1, FALSE);
|
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)
|
int u_inssub(linenr_T lnum)
|
||||||
{
|
{
|
||||||
if (undo_off)
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
return u_savecommon(lnum - 1, lnum, lnum + 1, FALSE);
|
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)
|
int u_savedel(linenr_T lnum, long nlines)
|
||||||
{
|
{
|
||||||
if (undo_off)
|
|
||||||
return OK;
|
|
||||||
|
|
||||||
return u_savecommon(lnum - 1, lnum + nlines,
|
return u_savecommon(lnum - 1, lnum + nlines,
|
||||||
nlines == curbuf->b_ml.ml_line_count ? 2 : lnum, FALSE);
|
nlines == curbuf->b_ml.ml_line_count ? 2 : lnum, FALSE);
|
||||||
}
|
}
|
||||||
@@ -2925,9 +2913,6 @@ void u_undoline(void)
|
|||||||
colnr_T t;
|
colnr_T t;
|
||||||
char_u *oldp;
|
char_u *oldp;
|
||||||
|
|
||||||
if (undo_off)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (curbuf->b_u_line_ptr == NULL
|
if (curbuf->b_u_line_ptr == NULL
|
||||||
|| curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count) {
|
|| curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count) {
|
||||||
beep_flush();
|
beep_flush();
|
||||||
|
Reference in New Issue
Block a user