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
Этот коммит содержится в:
родитель
ee383dbd6c
Коммит
cb34a67ea1
@ -13,6 +13,10 @@ CVS code -
|
|||||||
shortcut list, and tweak the unjustify routine to use it.
|
shortcut list, and tweak the unjustify routine to use it.
|
||||||
(DLR)
|
(DLR)
|
||||||
- files.c:
|
- 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()
|
write_marked()
|
||||||
- New function used to write the current marked selection to a
|
- New function used to write the current marked selection to a
|
||||||
file, split out from do_writeout(). (DLR)
|
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
|
interpreted as Ctrl-[character], and the support for Pico's
|
||||||
Esc Esc [three-digit decimal ASCII code] input method. (DLR)
|
Esc Esc [three-digit decimal ASCII code] input method. (DLR)
|
||||||
do_mark()
|
do_mark()
|
||||||
- Toggle MARK_ISSET() at the beginning of the function instead
|
- Toggle MARK_ISSET at the beginning of the function instead of
|
||||||
of setting it in one place and unsetting it in another place.
|
setting it in one place and unsetting it in another place.
|
||||||
(David Benbennick)
|
(David Benbennick)
|
||||||
do_suspend()
|
do_suspend()
|
||||||
- Use handle_hupterm() to handle SIGHUP and SIGTERM so we can
|
- Use handle_hupterm() to handle SIGHUP and SIGTERM so we can
|
||||||
|
11
src/files.c
11
src/files.c
@ -777,17 +777,24 @@ int add_open_file(int update)
|
|||||||
/* save current line number */
|
/* save current line number */
|
||||||
open_files->file_lineno = current->lineno;
|
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
|
/* if we're updating, save current modification status (and marking
|
||||||
status, if available) */
|
status, if available) */
|
||||||
if (update) {
|
if (update) {
|
||||||
#ifndef NANO_SMALL
|
#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)) {
|
if (ISSET(MARK_ISSET)) {
|
||||||
open_files->file_mark_beginbuf = mark_beginbuf;
|
open_files->file_mark_beginbuf = mark_beginbuf;
|
||||||
open_files->file_mark_beginx = mark_beginx;
|
open_files->file_mark_beginx = mark_beginx;
|
||||||
|
open_files->file_flags |= MARK_ISSET;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
open_files->file_flags = (MODIFIED & ISSET(MODIFIED));
|
if (ISSET(MODIFIED))
|
||||||
|
open_files->file_flags |= MODIFIED;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user