tweaks: drop two redundant conditions, and improve three comments
parent
95c966c3fc
commit
f9ff902bbc
11
src/nano.c
11
src/nano.c
|
@ -277,7 +277,7 @@ void die(const char *msg, ...)
|
||||||
while (openfile) {
|
while (openfile) {
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* If the current buffer has a lockfile, remove it. */
|
/* If the current buffer has a lockfile, remove it. */
|
||||||
if (ISSET(LOCKING) && openfile->lock_filename)
|
if (openfile->lock_filename)
|
||||||
delete_lockfile(openfile->lock_filename);
|
delete_lockfile(openfile->lock_filename);
|
||||||
#endif
|
#endif
|
||||||
/* When modified, save the current buffer. But not when in restricted
|
/* When modified, save the current buffer. But not when in restricted
|
||||||
|
@ -747,12 +747,11 @@ void do_exit(void)
|
||||||
statusbar(_("Cancelled"));
|
statusbar(_("Cancelled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close the current buffer, or terminate nano if it is the last. */
|
/* Close the current buffer, or terminate nano if it is the only buffer. */
|
||||||
void close_and_go(void)
|
void close_and_go(void)
|
||||||
{
|
{
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* If there is a lockfile, remove it. */
|
if (openfile->lock_filename)
|
||||||
if (ISSET(LOCKING) && openfile->lock_filename)
|
|
||||||
delete_lockfile(openfile->lock_filename);
|
delete_lockfile(openfile->lock_filename);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
|
@ -760,7 +759,7 @@ void close_and_go(void)
|
||||||
update_poshistory();
|
update_poshistory();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
/* If there is another buffer, close this one; otherwise terminate. */
|
/* If there is another buffer, just close this one; otherwise terminate. */
|
||||||
if (openfile != openfile->next) {
|
if (openfile != openfile->next) {
|
||||||
switch_to_next_buffer();
|
switch_to_next_buffer();
|
||||||
openfile = openfile->prev;
|
openfile = openfile->prev;
|
||||||
|
@ -779,7 +778,7 @@ void close_and_go(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that Ctrl+C was pressed during some system call. */
|
/* Register that Ctrl+C was pressed during some system call. */
|
||||||
RETSIGTYPE make_a_note(int signal)
|
RETSIGTYPE make_a_note(int signal)
|
||||||
{
|
{
|
||||||
control_C_was_pressed = TRUE;
|
control_C_was_pressed = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue