1
1

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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2004-02-06 21:20:05 +00:00
родитель ee383dbd6c
Коммит cb34a67ea1
2 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -13,6 +13,10 @@ CVS code -
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)
@ -361,8 +365,8 @@ GNU nano 1.3.0 - 2003.10.22
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

Просмотреть файл

@ -777,17 +777,24 @@ int add_open_file(int update)
/* 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
}