tweaks: rename a flag, to match the name of the option
parent
b81995af8a
commit
9c2b67231e
|
@ -687,7 +687,7 @@ bool close_buffer(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
if (ISSET(POS_HISTORY))
|
if (ISSET(POSITIONLOG))
|
||||||
update_poshistory(openfile->filename,
|
update_poshistory(openfile->filename,
|
||||||
openfile->current->lineno, xplustabs() + 1);
|
openfile->current->lineno, xplustabs() + 1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1221,7 +1221,7 @@ void do_insertfile(void)
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
if (ISSET(MULTIBUFFER)) {
|
if (ISSET(MULTIBUFFER)) {
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
if (ISSET(POS_HISTORY)) {
|
if (ISSET(POSITIONLOG)) {
|
||||||
ssize_t priorline, priorcol;
|
ssize_t priorline, priorcol;
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (!execute)
|
if (!execute)
|
||||||
|
|
|
@ -403,7 +403,7 @@ void load_poshistory(void)
|
||||||
if (hisfile == NULL) {
|
if (hisfile == NULL) {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
/* When reading failed, don't save history when we quit. */
|
/* When reading failed, don't save history when we quit. */
|
||||||
UNSET(POS_HISTORY);
|
UNSET(POSITIONLOG);
|
||||||
history_error(N_("Error reading %s: %s"), poshistname, strerror(errno));
|
history_error(N_("Error reading %s: %s"), poshistname, strerror(errno));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
14
src/nano.c
14
src/nano.c
|
@ -584,7 +584,7 @@ void finish(void)
|
||||||
/* If the user wants history persistence, write the relevant files. */
|
/* If the user wants history persistence, write the relevant files. */
|
||||||
if (ISSET(HISTORYLOG))
|
if (ISSET(HISTORYLOG))
|
||||||
save_history();
|
save_history();
|
||||||
if (ISSET(POS_HISTORY)) {
|
if (ISSET(POSITIONLOG)) {
|
||||||
update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1);
|
update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2152,7 +2152,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
case 'P':
|
case 'P':
|
||||||
SET(POS_HISTORY);
|
SET(POSITIONLOG);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_JUSTIFY
|
#ifdef ENABLE_JUSTIFY
|
||||||
|
@ -2427,7 +2427,7 @@ int main(int argc, char **argv)
|
||||||
UNSET(SUSPEND);
|
UNSET(SUSPEND);
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
UNSET(HISTORYLOG);
|
UNSET(HISTORYLOG);
|
||||||
UNSET(POS_HISTORY);
|
UNSET(POSITIONLOG);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2437,15 +2437,15 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* If we need history files, verify that we have a directory for them,
|
/* If we need history files, verify that we have a directory for them,
|
||||||
* and when not, cancel the options. */
|
* and when not, cancel the options. */
|
||||||
if ((ISSET(HISTORYLOG) || ISSET(POS_HISTORY)) && !have_statedir()) {
|
if ((ISSET(HISTORYLOG) || ISSET(POSITIONLOG)) && !have_statedir()) {
|
||||||
UNSET(HISTORYLOG);
|
UNSET(HISTORYLOG);
|
||||||
UNSET(POS_HISTORY);
|
UNSET(POSITIONLOG);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the user wants history persistence, read the relevant files. */
|
/* If the user wants history persistence, read the relevant files. */
|
||||||
if (ISSET(HISTORYLOG))
|
if (ISSET(HISTORYLOG))
|
||||||
load_history();
|
load_history();
|
||||||
if (ISSET(POS_HISTORY))
|
if (ISSET(POSITIONLOG))
|
||||||
load_poshistory();
|
load_poshistory();
|
||||||
#endif /* ENABLE_HISTORIES */
|
#endif /* ENABLE_HISTORIES */
|
||||||
|
|
||||||
|
@ -2631,7 +2631,7 @@ int main(int argc, char **argv)
|
||||||
if (givenline != 0 || givencol != 0)
|
if (givenline != 0 || givencol != 0)
|
||||||
do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
|
do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
else if (ISSET(POS_HISTORY) && openfile->filename[0] != '\0') {
|
else if (ISSET(POSITIONLOG) && openfile->filename[0] != '\0') {
|
||||||
ssize_t savedline, savedcol;
|
ssize_t savedline, savedcol;
|
||||||
/* If edited before, restore the last cursor position. */
|
/* If edited before, restore the last cursor position. */
|
||||||
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
||||||
|
|
|
@ -531,7 +531,7 @@ enum
|
||||||
BOLD_TEXT,
|
BOLD_TEXT,
|
||||||
QUIET,
|
QUIET,
|
||||||
SOFTWRAP,
|
SOFTWRAP,
|
||||||
POS_HISTORY,
|
POSITIONLOG,
|
||||||
LOCKING,
|
LOCKING,
|
||||||
NOREAD_MODE,
|
NOREAD_MODE,
|
||||||
MAKE_IT_UNIX,
|
MAKE_IT_UNIX,
|
||||||
|
|
|
@ -69,7 +69,7 @@ static const rcoption rcopts[] = {
|
||||||
{"operatingdir", 0},
|
{"operatingdir", 0},
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
{"positionlog", POS_HISTORY},
|
{"positionlog", POSITIONLOG},
|
||||||
#endif
|
#endif
|
||||||
{"preserve", PRESERVE},
|
{"preserve", PRESERVE},
|
||||||
#ifdef ENABLE_JUSTIFY
|
#ifdef ENABLE_JUSTIFY
|
||||||
|
|
Loading…
Reference in New Issue