Commit Graph

476 Commits (6ac73c94082786e1a12ef97e60a15d544abf2115)

Author SHA1 Message Date
David Lawrence Ramsey 114cfb63f4 in display_string(), fix memory corruption problems caused by not
allocating enough space for converted when a line ends in a tab(s) and
we're not in UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3272 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-03 03:58:49 +00:00
David Lawrence Ramsey 1f104f8079 fix a comment in nano.h and a minor memory leak in display_string()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-03 03:51:51 +00:00
David Lawrence Ramsey 3a5e6f9317 handle Shift-Delete properly when the -d option is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-30 21:23:51 +00:00
David Lawrence Ramsey 475c402b65 in parse_kbinput(), interpret Shift-Begin, Shift-Delete, Shift-End,
Shift-Home, Shift-Insert, and Shift-Suspend as Begin, Delete, End, Home,
Insert, and Suspend, respectively, regardless of whether --rebindkeypad
is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-30 01:32:41 +00:00
David Lawrence Ramsey a6eb8480ea really fix the previous display problem with searches that move the
cursor offscreen and from a page other than the first one onto a
different page by reverting the erroneous change to edit_scroll() and
adding the proper fix to edit_redraw()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-10 07:51:49 +00:00
David Lawrence Ramsey 47cfd197b8 in edit_scroll(), redraw the lines before and after the scrolled region
even if the scrolled region was only one line; this fixes a display
problem that occurs after doing a search that scrolls the screen down
one line and leaves the cursor on the last line of the screen, in which
case we need to update the line after the scrolled region


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-02 04:30:33 +00:00
David Lawrence Ramsey b0e04c0de3 a few last comment and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:24:54 +00:00
David Lawrence Ramsey 6d6a36c647 add descriptive comments to pretty much all functions and major
variables that don't have them, plus a few miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:09:08 +00:00
David Lawrence Ramsey 034b994eb5 since proto.h includes nano.h, and nano.h includes config.h first,
include proto.h first and remove redundant includes of config.h in all
non-header source files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 02:47:10 +00:00
David Lawrence Ramsey 24777c0740 fix compilation with --enable-debug, and remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-01 05:49:08 +00:00
David Lawrence Ramsey 315eb3280a adjust copyright notices in all source files to account for Chris'
reassigning the 2005-2006 copyright on nano to me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-28 19:35:29 +00:00
David Lawrence Ramsey cfffbf71ce in reset_statusbar_cursor(), fix cursor placement problem by modeling
the code more closely after reset_cursor()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 03:14:11 +00:00
David Lawrence Ramsey ebe3425f9f rename the NANO_SMALL #define to NANO_TINY
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 03:17:35 +00:00
David Lawrence Ramsey b885c9c5e9 revert change to edit_update(), since it's used when fileage may be
temporarily out of range, and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 05:20:25 +00:00
David Lawrence Ramsey e99223dd25 tweak do_wrap(), remove_magicline(), edit_scroll(), and edit_update() to
rely on fileage and filebot instead of NULL for their checks to detect
the top or bottom of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 04:27:30 +00:00
David Lawrence Ramsey b3c6b40550 in update_line(), remove now-unneeded logic that set the index parameter
to zero if the fileptr parameter didn't point to current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 06:20:02 +00:00
David Lawrence Ramsey 38ebba11b7 move do_yesno() to prompt.c too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:07:24 +00:00
David Lawrence Ramsey 00cc565ddd move check_linenumbers(), dump_buffer(), and dump_buffer_reverse() from
winio.c to utils.c too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3076 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-02 15:44:01 +00:00
David Lawrence Ramsey 305c6459e9 in do_yesno(), make mouse clicks on the Yes/No/All shortcuts work properly when the MORE_SPACE flag is set
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-02 15:32:30 +00:00
David Lawrence Ramsey 7e2d673b5f move functions specific to the help browser to their own source file,
help.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 19:32:45 +00:00
David Lawrence Ramsey 143b8c7b13 free prompt when it isn't used, and add missing stdio.h #includes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3067 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 18:35:47 +00:00
David Lawrence Ramsey 2b9d6a0e6c move get_page_start() from winio.c to utils.c too, and fix a few
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:45:31 +00:00
David Lawrence Ramsey d24d0a43e8 move functions specific to the statusbar prompt to their own source
file, prompt.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:37:44 +00:00
David Lawrence Ramsey 81c4e187f5 move xplustabs(), actual_x(), strnlenpt(), and strlenpt() from winio.c
to utils.c, as they're really utility functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 23:07:58 +00:00
David Lawrence Ramsey 67d1951e4d refactor the statusbar code to have and use statusbar_xplustabs(), for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 19:36:37 +00:00
David Lawrence Ramsey 3e477263da in nanoget_repaint(), rename parameter inputbuf to buf, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3062 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 01:32:46 +00:00
David Lawrence Ramsey f726053325 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3060 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-28 17:12:58 +00:00
David Lawrence Ramsey a0aff67a4d rename edit_add() to edit_draw(), and rename its parameter yval to line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 20:10:45 +00:00
David Lawrence Ramsey 07a47017d7 fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3056 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 15:33:05 +00:00
David Lawrence Ramsey 52320f344d make sure we don't treat a click on an empty area of the shortcut list
as a statusbar prompt click


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3055 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 15:27:09 +00:00
David Lawrence Ramsey b5776ac698 make prompt a static instead of a global, since it's only used in
winio.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 05:00:48 +00:00
David Lawrence Ramsey 2c8cf48372 at long last, properly handle mouse clicks on the statusbar prompt text
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 04:51:41 +00:00
David Lawrence Ramsey 874703be5f cosmetically refactor statusbar()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 03:35:42 +00:00
David Lawrence Ramsey 3d12f0f53d refactor nanoget_repaint() to split out the new function
get_statusbar_page_start(), the statusbar prompt's equivalent of
get_page_start(); also make sure that the minimum allowed terminal size
in columns is 4, as the statusbar prompt code relies on this assumption
and will crash otherwise


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-26 23:14:59 +00:00
David Lawrence Ramsey 6f5de42702 in get_key_buffer(), only save all open buffers and hang up when a
blocking wgetch() returns ERR and errno is set to EIO (input/output
error); if errno is set to something else, recover properly; this fixes
problems with nano's erroneously hanging up while e.g. resizing or
unsuspending in a chroot


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3038 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-06 05:28:37 +00:00
David Lawrence Ramsey 37dd775f98 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-04 03:41:32 +00:00
David Lawrence Ramsey 86b6c3e5db in display_string(), *really* avoid a memory corruption problem by
allocating enough space for (COLS + 1) characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3034 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-04 03:40:41 +00:00
David Lawrence Ramsey ec729750b0 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-25 18:42:05 +00:00
David Lawrence Ramsey 8f36d09d18 in get_escape_seq_kbinput(), fix a typo preventing the
VT100/VT220/VT320/xterm/rxvt escape sequence for ',' on the numeric
keypad with NumLock off from being interpreted properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-24 19:42:48 +00:00
David Lawrence Ramsey c4b854d5c7 in display_string(), really avoid a memory corruption problem by
allocating enough space for COLS characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3021 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-20 04:15:33 +00:00
David Lawrence Ramsey a03d9c0ecd fix another minor spacing problem in titlebar()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-16 17:24:22 +00:00
David Lawrence Ramsey feb89db8a0 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-13 04:45:46 +00:00
David Lawrence Ramsey 7f26c7384d in display_string(), if column is less than start_col and the
character's a tab, which can be possible if there are enough tabs and
the terminal size is sufficiently large, don't try to display it using
control_mbrep()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-05 01:36:47 +00:00
David Lawrence Ramsey 1c367b6949 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-04 03:29:47 +00:00
David Lawrence Ramsey 7fc0ada6cc fix compilation with --enable-debug
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 18:52:06 +00:00
David Lawrence Ramsey 20d3cb0614 fix credits length
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 18:51:27 +00:00
David Lawrence Ramsey 47daf0279d add Mike Frysinger to credits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 18:29:02 +00:00
David Lawrence Ramsey 6834650570 really fix edit_scroll() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-16 03:03:15 +00:00
David Lawrence Ramsey 8ad58bcde3 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-16 03:02:46 +00:00
David Lawrence Ramsey a9b862c804 fix more edit_scroll() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-16 01:27:05 +00:00