Commit Graph

1047 Commits (69a28122c1c0f6cc783d9cff03f9fd7ddaf9c0bc)

Author SHA1 Message Date
David Lawrence Ramsey 69a28122c1 make sure that the shortcut list properly displays "Close" when reading
in multiple files on the command line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 04:34:00 +00:00
David Lawrence Ramsey 6420d445c2 add a bunch of DB's miscellaneous fixes, plus a few of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-11 05:13:08 +00:00
David Lawrence Ramsey 049e4a5db3 per DB's patch, simplify the saving of emergency files in die(),
die_save_file(), and get_next_filename()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-10 23:05:59 +00:00
David Lawrence Ramsey 6b24856c2f add titlebar() calls before all open_file() calls and remove the
titlebar() call after them, so that the titlebar is displayed properly
for all file(s) loaded; also add missing int -> bool conversion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 22:33:14 +00:00
David Lawrence Ramsey 00d7798756 per DB's patch, convert a few parts of files.c to use bool so that
open_pipe()'s failure is handled properly again, and add various
#ifdefs to fix a few warnings and compilation problems that occur when
everything is enabled manually including NANO_SMALL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1886 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 21:27:37 +00:00
David Lawrence Ramsey ce62e82a93 per DB's patch, convert nano.c to use bools wherever needed, add a few
efficiency tweaks, and fix a few minor bugs in help_init() where "Up"
and "Space" might not be displayed properly and the help browser
wouldn't work if fewer than 24 columns were available


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1885 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 22:10:22 +00:00
David Lawrence Ramsey 73cd1a5ded document DB's warning fixes when ENABLE_NLS is undefined and the
-fwritable-strings option is used, which were part of his last patch to
convert more translated strings to use N_()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1884 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 21:57:48 +00:00
David Lawrence Ramsey 76f63ff58d per DB's patch, convert more of nano to use N_() when possible; also add
a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1883 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:45:09 +00:00
David Lawrence Ramsey 22fac783f5 per DB's patch, don't translate the option strings for -Z/--restricted;
also add a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:16:19 +00:00
David Lawrence Ramsey c53ab2a854 tweak parse_num() to return a bool, and fix backwards test of its value
so that numeric values will be preserved when switching to the "Go To
Line" prompt again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-04 18:24:53 +00:00
David Lawrence Ramsey 4d44d2de0e make lastwastab and list use TRUE and FALSE instead of 1 and 0, make
them bools in the process, and make a few other minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1880 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:35:31 +00:00
David Lawrence Ramsey 8bf9ba0c16 tweak the spec file to properly package the "rnano" symlink
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:00:29 +00:00
David Lawrence Ramsey 76fb3eccda automatically install a symlink "rnano" pointing to nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 16:09:15 +00:00
David Lawrence Ramsey b8c479a9e9 add DB's fix for a problem where quoted justify wouldn't work if
HAVE_REGEX_H wasn't set, and don't treat the return values of the string
comparison functions as boolean anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1877 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-31 14:10:23 +00:00
David Lawrence Ramsey a6d26d04fd rcfile tweaks: prompt only once for all rcfile errors instead of once
for each separate error, make sure all the messages end in newlines,
etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1876 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 22:52:44 +00:00
David Lawrence Ramsey 906257932f add my display tweak to do_replace(), my efficiency tweaks to
do_gotoline(), and DB's efficiency tweaks to do_gotopos()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 20:21:34 +00:00
David Lawrence Ramsey 9ef3adbc1d add a consistency fix for do_enter() and a few minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 17:30:17 +00:00
David Lawrence Ramsey 819c7f0327 add DB's overhaul of the paragraph searching code and some of the
justify code, as it makes some code much more understandable and fixes a
bug where searching for the previous paragraph would move the cursor too
high in one case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 03:54:34 +00:00
David Lawrence Ramsey f56cc9e0e9 in do_replace_loop(), make sure old_pww is updated to the current value
of placewewant when a new match is found, so that edit_redraw() will
redraw the screen properly when only placewewant changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1872 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-29 14:32:17 +00:00
David Lawrence Ramsey 86e851b4e7 per DB's patch, convert placewewant to a size_t; also add a few
miscellaneous fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1870 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 20:46:25 +00:00
David Lawrence Ramsey 2d140c2980 add various improvements to the "c-file" regexes by Mike Frysinger, with
a few additions of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1869 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 13:50:43 +00:00
David Lawrence Ramsey 7d3817fb3e add Mike Frysinger's sample regexes for patch files
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 13:03:06 +00:00
David Lawrence Ramsey 8aaf03000b move the main terminal initialization functions, aside from initscr(),
into a new terminal_init() function, and convert nano to use it; also,
when reloading the newly spell-checked temporary file in
do_alt_speller(), call terminal_init() to make sure that all the
original terminal settings are restored, as a curses-based alternative
spell checker (e.g. aspell) can change them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1866 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 16:46:35 +00:00
David Lawrence Ramsey ad1fd0d968 per Junichi Uekawa's patch in Debian's version of nano, call setlocale()
outside the ENABLE_NLS #ifdef, since UTF-8 support (specifically, the
wide character handling functions it needs) won't work properly if the
locale isn't set, whether NLS is enabled or not


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 15:46:58 +00:00
David Lawrence Ramsey 1536f8613d fix spacing problem in the "Save Under Different Name" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-24 16:50:20 +00:00
David Lawrence Ramsey 8037fe076b a few miscellaneous Pico compatibility tweaks and bugfixes (most
importantly, a fix for a segfault when trying to full-justify a file
with no paragraphs)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1862 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-23 12:30:40 +00:00
David Lawrence Ramsey 04419b9702 and reset tabsize and wrap_at to their default values if invalid rcfile
entries are specified for them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1860 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 18:13:54 +00:00
David Lawrence Ramsey 36dd87b1fb properly handle invalid tab sizes in nanorc files and make a few more
cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1859 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 17:43:43 +00:00
David Lawrence Ramsey fd3039a8e7 cut down on redundant inclusions of <sys/types.h>, include it in proto.h
per DB's patch, and make a few more minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1857 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-17 19:49:12 +00:00
David Lawrence Ramsey aea4dabf59 per DB's patch, remove some unneeded reset_cursor() calls, move the one
in the main input loop to the top, and remove the apparently unneeded
wrefresh() call in the main input loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-13 17:09:24 +00:00
David Lawrence Ramsey 49c3f2406d port over DB's number parsing code and related bits, with a few minor
changes of mine, and add a few related variable type changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:07:14 +00:00
David Lawrence Ramsey 576bf331ef various changes to cut down on binary size: per DB's patch, add new N_()
macro to mark strings that aren't translated immediately and convert
nano to use it where needed, overhaul the shortcut list and toggle list
initialization code for efficiency, and replace rcfile_msg() with
rcfile_error(); also add a few minor miscellaneous cleanups by DB and
myself


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 03:10:30 +00:00
David Lawrence Ramsey f708037715 add another prototype fix and a few spacing fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1849 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:15:10 +00:00
David Lawrence Ramsey a5dda84a07 per DB's patch, remove unused global variable search_offscreen
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1848 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 15:27:04 +00:00
David Lawrence Ramsey f7b5d930a9 if we're in restricted mode and the filename isn't blank, disable tab
completion at the "Write File" prompt, since we can't change the
filename in that case; also remove an unneeded trailing space


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1842 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-05 14:27:29 +00:00
David Lawrence Ramsey 4693864a78 fix bug in do_justify() in a better way: add on_next_line flag, used to
indicate when we've moved to the next line after justifying the current
line, and only run the respacing routine when it's true; this keeps the
respacing routine from erroneously being run more than once on the same
line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1840 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 14:15:58 +00:00
David Lawrence Ramsey 01a6bf4f9a fix bug in do_justify(): if all the text from the next line has been
moved to the current line and the next line has been deleted, continue
the justification loop from there and skip the respacing routine in
order to avoid running it more than once on the same line (since it
assumes that we've moved to the next line, which isn't true in that
case)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1839 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 05:23:19 +00:00
David Lawrence Ramsey c8c69d5449 for consistency with nano 1.2.x and with other editors, make the mode of
newly created files 666 instead of 600 before it's modified by the
umask; also add a few more minor comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1838 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 03:22:23 +00:00
David Lawrence Ramsey edab0cc0a5 a few cleanups and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1837 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 03:09:12 +00:00
David Lawrence Ramsey 72e51ab037 per DB's patch (with a few updates of mine), convert the shortcut list
functions and most related functions to return void instead of int, as
the return values of all those functions are essentially unused; also
add a few related miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-02 14:31:03 +00:00
David Lawrence Ramsey ebd0d7c859 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 18:59:52 +00:00
David Lawrence Ramsey 0fb841a78a per DB's patch, tweak the code to update the edit window just before
getting statusbar input for efficiency, and update bottomwin just before
then too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1833 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 17:04:23 +00:00
David Lawrence Ramsey cff5558394 per Jon Oberheide's patch, fix erroneous debugging statement so that
nano compiles with --enable-debug again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1832 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-30 12:28:15 +00:00
David Lawrence Ramsey db357a1ece per Mike Frysinger's patch, have whitespace display default to off
instead of on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1831 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-29 12:36:25 +00:00
David Lawrence Ramsey a539fce4ad fix erroneous #ifdef so that nano compiles with --disable-justify again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1830 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-29 00:43:56 +00:00
David Lawrence Ramsey d36715e8ac Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1829 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-28 13:23:37 +00:00
David Lawrence Ramsey e1151561ad GNU nano 1.3.3
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-28 13:17:33 +00:00
David Lawrence Ramsey dbde9d7577 refactor the code to search for the beginning of a paragraph a bit to
fix some inaccuracies and eliminate the need for recursion; it now uses
almost the same logic as the code to search for the end of a paragraph,
which makes it somewhat easier to understand


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1823 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-27 00:54:08 +00:00
Jordi Mallach 21ad762998 Add a translation comment so translators use both their shortcuts as well as the English ones.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1818 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-25 22:43:09 +00:00
Jordi Mallach d350727726 Fix XSI:ism in config.rpath.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1817 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-25 22:34:18 +00:00