commit 8d41fb8c3e1361f59521df26c31b1691da4ed047
parent 3c7dda6e7e192ee0a6d3d4703299700754b10fc0
Author: Chris Allegretta <chrisa@asty.org>
Date: Wed, 23 Dec 2009 05:03:09 +0000
2009-12-22 Chris Allegretta <chrisa@asty.org>
* files.c (write_file): Fix compatibility with previous stat fix and tiny mode.
2009-12-22 David Lawrence Ramsey <pooka109@gmail.com>
* global.c: Add new strings for forward/back in the file browser. New variables
nano_forwardfile_msg and nano_backfile_msg.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-22 Chris Allegretta <chrisa@asty.org>
+ * files.c (write_file): Fix compatibility with previous stat fix and tiny mode.
+
+2009-12-22 David Lawrence Ramsey <pooka109@gmail.com>
+ * global.c: Add new strings for forward/back in the file browser. New variables
+ nano_forwardfile_msg and nano_backfile_msg.
+
2009-12-20 Chris Allegretta <chrisa@asty.org>
* files.c (is_file_writable): remove assert check for f, since it's not
initialized at the time. Fixes Savannah bug 28309, reported by Zoltan Kovacs.
diff --git a/src/files.c b/src/files.c
@@ -1499,6 +1499,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
* one). */
realexists = (stat(realname, &st) != -1);
+#ifndef NANO_TINY
/* if we have not stat()d this file before (say, the user just
* specified it interactively), use the info we just got from
* stat()ing or else we will chase null pointers when we do
@@ -1506,7 +1507,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
if(openfile->current_stat == NULL)
openfile->current_stat = &st;
-#ifndef NANO_TINY
/* We backup only if the backup toggle is set, the file isn't
* temporary, and the file already exists. Furthermore, if we
* aren't appending, prepending, or writing a selection, we backup
diff --git a/src/global.c b/src/global.c
@@ -638,8 +638,9 @@ void shortcut_init(bool unjustify)
N_("Go to the first file in the list");
const char *nano_lastfile_msg =
N_("Go to the last file in the list");
+ const char *nano_forwardfile_msg = N_("Go to the next file in the list");
+ const char *nano_backfile_msg = N_("Go to the previous file in the list");
const char *nano_gotodir_msg = N_("Go to directory");
-
#endif
#endif /* !DISABLE_HELP */
@@ -792,12 +793,24 @@ void shortcut_init(bool unjustify)
#endif
- add_to_funcs(DO_RIGHT, (MMAIN|MBROWSER), N_("Forward"), IFSCHELP(nano_forward_msg),
+ add_to_funcs(DO_RIGHT, MMAIN, N_("Forward"), IFSCHELP(nano_forward_msg),
+ FALSE, VIEW);
+
+#ifndef DISABLE_BROWSER
+ add_to_funcs(DO_RIGHT, MBROWSER, N_("Forward"), IFSCHELP(nano_forwardfile_msg),
FALSE, VIEW);
+#endif
+
add_to_funcs(DO_RIGHT, MALL, "", "", FALSE, VIEW);
- add_to_funcs(DO_LEFT, (MMAIN|MBROWSER), N_("Back"), IFSCHELP(nano_back_msg),
+ add_to_funcs(DO_LEFT, MMAIN, N_("Back"), IFSCHELP(nano_back_msg),
FALSE, VIEW);
+
+#ifndef DISABLE_BROWSER
+ add_to_funcs(DO_LEFT, MBROWSER, N_("Back"), IFSCHELP(nano_backfile_msg),
+ FALSE, VIEW);
+#endif
+
add_to_funcs(DO_LEFT, MALL, "", "", FALSE, VIEW);
#ifndef NANO_TINY