Commit 8d41fb8c authored by Chris Allegretta's avatar Chris Allegretta
Browse files

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
No related merge requests found
Showing with 24 additions and 4 deletions
+24 -4
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> 2009-12-20 Chris Allegretta <chrisa@asty.org>
* files.c (is_file_writable): remove assert check for f, since it's not * 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. initialized at the time. Fixes Savannah bug 28309, reported by Zoltan Kovacs.
......
...@@ -1499,6 +1499,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type ...@@ -1499,6 +1499,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
* one). */ * one). */
realexists = (stat(realname, &st) != -1); realexists = (stat(realname, &st) != -1);
#ifndef NANO_TINY
/* if we have not stat()d this file before (say, the user just /* if we have not stat()d this file before (say, the user just
* specified it interactively), use the info we just got from * specified it interactively), use the info we just got from
* stat()ing or else we will chase null pointers when we do * 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 ...@@ -1506,7 +1507,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
if(openfile->current_stat == NULL) if(openfile->current_stat == NULL)
openfile->current_stat = &st; openfile->current_stat = &st;
#ifndef NANO_TINY
/* We backup only if the backup toggle is set, the file isn't /* We backup only if the backup toggle is set, the file isn't
* temporary, and the file already exists. Furthermore, if we * temporary, and the file already exists. Furthermore, if we
* aren't appending, prepending, or writing a selection, we backup * aren't appending, prepending, or writing a selection, we backup
......
...@@ -638,8 +638,9 @@ void shortcut_init(bool unjustify) ...@@ -638,8 +638,9 @@ void shortcut_init(bool unjustify)
N_("Go to the first file in the list"); N_("Go to the first file in the list");
const char *nano_lastfile_msg = const char *nano_lastfile_msg =
N_("Go to the last file in the list"); 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"); const char *nano_gotodir_msg = N_("Go to directory");
#endif #endif
#endif /* !DISABLE_HELP */ #endif /* !DISABLE_HELP */
...@@ -792,12 +793,24 @@ void shortcut_init(bool unjustify) ...@@ -792,12 +793,24 @@ void shortcut_init(bool unjustify)
#endif #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); FALSE, VIEW);
#endif
add_to_funcs(DO_RIGHT, MALL, "", "", FALSE, VIEW); 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); 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); add_to_funcs(DO_LEFT, MALL, "", "", FALSE, VIEW);
#ifndef NANO_TINY #ifndef NANO_TINY
......
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