mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-25 02:32:16 +03:00
tweaks: strip a parameter that is TRUE for both calls
The parameter has been redundant since version 4.0, commit d54840c1
,
when the last call with FALSE was removed.
This commit is contained in:
parent
a92511ceaf
commit
01bc0148c0
@ -593,7 +593,7 @@ void close_buffer(void)
|
||||
free(orphan->current_stat);
|
||||
free(orphan->lock_filename);
|
||||
/* Free the undo stack. */
|
||||
discard_until(NULL, orphan, TRUE);
|
||||
discard_until(NULL, orphan);
|
||||
#endif
|
||||
|
||||
openfile = orphan->prev;
|
||||
|
@ -502,7 +502,7 @@ void do_undo(void);
|
||||
void do_redo(void);
|
||||
void do_enter(void);
|
||||
#ifndef NANO_TINY
|
||||
void discard_until(const undostruct *thisitem, openfilestruct *thefile, bool keep);
|
||||
void discard_until(const undostruct *thisitem, openfilestruct *thefile);
|
||||
void add_undo(undo_type action, const char *message);
|
||||
void update_multiline_undo(ssize_t lineno, char *indentation);
|
||||
void update_undo(undo_type action);
|
||||
|
12
src/text.c
12
src/text.c
@ -899,9 +899,8 @@ void do_enter(void)
|
||||
}
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Discard undo items that are newer than the given one, or all if NULL.
|
||||
* When keep is TRUE, do not touch the last_saved pointer. */
|
||||
void discard_until(const undostruct *thisitem, openfilestruct *thefile, bool keep)
|
||||
/* Discard undo items that are newer than the given one, or all if NULL. */
|
||||
void discard_until(const undostruct *thisitem, openfilestruct *thefile)
|
||||
{
|
||||
undostruct *dropit = thefile->undotop;
|
||||
groupstruct *group;
|
||||
@ -927,11 +926,6 @@ void discard_until(const undostruct *thisitem, openfilestruct *thefile, bool kee
|
||||
|
||||
/* Prevent a chain of editing actions from continuing. */
|
||||
thefile->last_action = OTHER;
|
||||
|
||||
/* When requested, record that the undo stack was chopped, and
|
||||
* that thus there is no point at which the file was last saved. */
|
||||
if (!keep)
|
||||
thefile->last_saved = (undostruct *)0xbeeb;
|
||||
}
|
||||
|
||||
/* Add a new undo item of the given type to the top of the current pile. */
|
||||
@ -954,7 +948,7 @@ void add_undo(undo_type action, const char *message)
|
||||
u->xflags = 0;
|
||||
|
||||
/* Blow away any undone items. */
|
||||
discard_until(openfile->current_undo, openfile, TRUE);
|
||||
discard_until(openfile->current_undo, openfile);
|
||||
|
||||
#ifdef ENABLE_WRAPPING
|
||||
/* If some action caused automatic long-line wrapping, insert the
|
||||
|
Loading…
Reference in New Issue
Block a user