Commit 619044e8 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: put some conditions in a better order: the main one first

parent e0e788e2
Showing with 3 additions and 3 deletions
+3 -3
...@@ -2250,7 +2250,7 @@ int do_writeout(bool exiting) ...@@ -2250,7 +2250,7 @@ int do_writeout(bool exiting)
given = mallocstrcpy(NULL, given = mallocstrcpy(NULL,
#ifndef NANO_TINY #ifndef NANO_TINY
(!exiting && openfile->mark_set) ? "" : (openfile->mark_set && !exiting) ? "" :
#endif #endif
openfile->filename); openfile->filename);
...@@ -2268,7 +2268,7 @@ int do_writeout(bool exiting) ...@@ -2268,7 +2268,7 @@ int do_writeout(bool exiting)
* Selection to File" prompt. This function is disabled, since * Selection to File" prompt. This function is disabled, since
* it allows reading from or writing to files not specified on * it allows reading from or writing to files not specified on
* the command line. */ * the command line. */
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set) if (openfile->mark_set && !exiting && !ISSET(RESTRICTED))
msg = (append == PREPEND) ? _("Prepend Selection to File") : msg = (append == PREPEND) ? _("Prepend Selection to File") :
(append == APPEND) ? _("Append Selection to File") : (append == APPEND) ? _("Append Selection to File") :
_("Write Selection to File"); _("Write Selection to File");
...@@ -2469,7 +2469,7 @@ int do_writeout(bool exiting) ...@@ -2469,7 +2469,7 @@ int do_writeout(bool exiting)
* function is disabled, since it allows reading from or * function is disabled, since it allows reading from or
* writing to files not specified on the command line. */ * writing to files not specified on the command line. */
#ifndef NANO_TINY #ifndef NANO_TINY
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set) if (openfile->mark_set && !exiting && !ISSET(RESTRICTED))
result = write_marked_file(answer, NULL, FALSE, append); result = write_marked_file(answer, NULL, FALSE, append);
else else
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment