shortcut list, and tweak the unjustify routine to use it.
(DLR)
- files.c:
+ add_open_files()
+ - Make the saving of marked status in open_files->file_flags
+ work properly again; a tweak to the ISSET() macro in 1.3.0
+ to make it only return 0 or 1 broke it. (DLR)
write_marked()
- New function used to write the current marked selection to a
file, split out from do_writeout(). (DLR)
interpreted as Ctrl-[character], and the support for Pico's
Esc Esc [three-digit decimal ASCII code] input method. (DLR)
do_mark()
- - Toggle MARK_ISSET() at the beginning of the function instead
- of setting it in one place and unsetting it in another place.
+ - Toggle MARK_ISSET at the beginning of the function instead of
+ setting it in one place and unsetting it in another place.
(David Benbennick)
do_suspend()
- Use handle_hupterm() to handle SIGHUP and SIGTERM so we can
/* save current line number */
open_files->file_lineno = current->lineno;
+ /* start with default modification status: unmodified (and marking
+ status, if available: unmarked) */
+ open_files->file_flags = 0;
+
/* if we're updating, save current modification status (and marking
status, if available) */
if (update) {
#ifndef NANO_SMALL
- open_files->file_flags = (MODIFIED & ISSET(MODIFIED)) | (MARK_ISSET & ISSET(MARK_ISSET));
+ if (ISSET(MODIFIED))
+ open_files->file_flags |= MODIFIED;
if (ISSET(MARK_ISSET)) {
open_files->file_mark_beginbuf = mark_beginbuf;
open_files->file_mark_beginx = mark_beginx;
+ open_files->file_flags |= MARK_ISSET;
}
#else
- open_files->file_flags = (MODIFIED & ISSET(MODIFIED));
+ if (ISSET(MODIFIED))
+ open_files->file_flags |= MODIFIED;
#endif
}