Commit 417b03a4 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

make sure the "historylog" option isn't included in tiny mode

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 21cc5507
Showing with 13 additions and 3 deletions
+13 -3
...@@ -29,6 +29,8 @@ CVS code - ...@@ -29,6 +29,8 @@ CVS code -
new functions do_para_operation(), do_para_begin(), and new functions do_para_operation(), do_para_begin(), and
do_para_end(). Note that the last three functions are do_para_end(). Note that the last three functions are
disabled if justification is disabled. (DLR) disabled if justification is disabled. (DLR)
- Make sure the "historylog" option isn't included at all if
NANO_SMALL is defined. (DLR)
- files.c: - files.c:
do_browser() do_browser()
- Some of the Pico compatibility options in the file browser - Some of the Pico compatibility options in the file browser
......
...@@ -2870,7 +2870,7 @@ void load_history(void) ...@@ -2870,7 +2870,7 @@ void load_history(void)
if (homenv != NULL || userage != NULL) { if (homenv != NULL || userage != NULL) {
hist = fopen(nanohist, "r"); hist = fopen(nanohist, "r");
if (!hist) { if (hist == NULL) {
if (errno != ENOENT) { if (errno != ENOENT) {
/* Don't save history when we quit. */ /* Don't save history when we quit. */
UNSET(HISTORYLOG); UNSET(HISTORYLOG);
...@@ -2923,7 +2923,7 @@ void save_history(void) ...@@ -2923,7 +2923,7 @@ void save_history(void)
if (homenv != NULL || userage != NULL) { if (homenv != NULL || userage != NULL) {
hist = fopen(nanohist, "wb"); hist = fopen(nanohist, "wb");
if (!hist) { if (hist == NULL) {
rcfile_msg(_("Unable to write ~/.nano_history file, %s"), strerror(errno)); rcfile_msg(_("Unable to write ~/.nano_history file, %s"), strerror(errno));
} else { } else {
/* set rw only by owner for security ?? */ /* set rw only by owner for security ?? */
......
...@@ -630,7 +630,9 @@ void usage(void) ...@@ -630,7 +630,9 @@ void usage(void)
print1opt("-F", "--multibuffer", _("Enable multiple file buffers")); print1opt("-F", "--multibuffer", _("Enable multiple file buffers"));
#endif #endif
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
#ifndef NANO_SMALL
print1opt("-H", "--historylog", _("Log & read search/replace string history")); print1opt("-H", "--historylog", _("Log & read search/replace string history"));
#endif
print1opt("-I", "--ignorercfiles", _("Don't look at nanorc files")); print1opt("-I", "--ignorercfiles", _("Don't look at nanorc files"));
#endif #endif
#ifndef NANO_SMALL #ifndef NANO_SMALL
...@@ -3128,7 +3130,9 @@ int main(int argc, char *argv[]) ...@@ -3128,7 +3130,9 @@ int main(int argc, char *argv[])
{"multibuffer", 0, 0, 'F'}, {"multibuffer", 0, 0, 'F'},
#endif #endif
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
#ifndef NANO_SMALL
{"historylog", 0, 0, 'H'}, {"historylog", 0, 0, 'H'},
#endif
{"ignorercfiles", 0, 0, 'I'}, {"ignorercfiles", 0, 0, 'I'},
#endif #endif
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
...@@ -3223,9 +3227,11 @@ int main(int argc, char *argv[]) ...@@ -3223,9 +3227,11 @@ int main(int argc, char *argv[])
break; break;
#endif #endif
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
#ifndef NANO_SMALL
case 'H': case 'H':
SET(HISTORYLOG); SET(HISTORYLOG);
break; break;
#endif
case 'I': case 'I':
SET(NO_RCFILE); SET(NO_RCFILE);
break; break;
......
...@@ -49,6 +49,9 @@ const static rcoption rcopts[] = { ...@@ -49,6 +49,9 @@ const static rcoption rcopts[] = {
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
{"fill", 0}, {"fill", 0},
#endif #endif
#ifndef NANO_SMALL
{"historylog", HISTORYLOG},
#endif
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION) #if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
{"mouse", USE_MOUSE}, {"mouse", USE_MOUSE},
#endif #endif
...@@ -84,7 +87,6 @@ const static rcoption rcopts[] = { ...@@ -84,7 +87,6 @@ const static rcoption rcopts[] = {
{"tabsize", 0}, {"tabsize", 0},
{"tempfile", TEMP_OPT}, {"tempfile", TEMP_OPT},
{"view", VIEW_MODE}, {"view", VIEW_MODE},
{"historylog", HISTORYLOG},
{NULL, 0} {NULL, 0}
}; };
......
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