Commit Graph

288 Commits (b3b2fa8856a4ea7ff9b9bda2b78487c95141e3a6)

Author SHA1 Message Date
Benno Schulenberg 7e5324d164 Making 'meta_key' and 'func_key' into global variables, instead of
having them declared everywhere and passing them around endlessly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 18:04:33 +00:00
Benno Schulenberg a0f66c0691 Renaming 'no_replace_void()' to 'flip_replace_void()',
to show what it actually does.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 18:30:35 +00:00
Benno Schulenberg b341f29cbd Transform many DISABLE_NANORC #ifdefs to the new DISABLE_HISTORIES.
This completes the fix for Savannah bug #42539.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 20:05:24 +00:00
Benno Schulenberg a2d74f7e5e Removing duplicate translator comments, and adding some others.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-28 14:34:11 +00:00
Benno Schulenberg 5298d5114c Removing an unneeded call of edit_refresh(), and
using 'size_t' instead of 'int' for line lengths.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 10:50:01 +00:00
Benno Schulenberg 6081546161 Going to the correct positions for undoing and redoing cuts and
pastes.  This fixes many undo problems and Savannah bug #25585.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-15 20:00:46 +00:00
Benno Schulenberg 7a9f4a456e Update the years in the copyright notices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-30 20:18:26 +00:00
Benno Schulenberg e167afe14d Renaming MREPLACE2 to MREPLACEWITH, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-16 09:26:15 +00:00
Benno Schulenberg 5bd359dbb9 Normalizing whitespace around '==' comparison.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-15 15:02:43 +00:00
Benno Schulenberg 8f6151198a Whitespace adjustments, plus a few comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:57:06 +00:00
Benno Schulenberg 7828a8096e Removing the unused parameter 'func_key' from get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:22:29 +00:00
Benno Schulenberg eea0908236 Converting #ifdef ENABLE_NANORC to #ifndef DISABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-13 20:50:20 +00:00
Benno Schulenberg d19be5aafa More editing of comment blocks and trimming of blank lines.
Patch by David Lawrence Ramsey, slightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:38:45 +00:00
Benno Schulenberg 26fd9b29a3 Fixing compilation with --enable-browser and tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 15:31:40 +00:00
Benno Schulenberg 00389928d4 Converting #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 11:59:03 +00:00
Benno Schulenberg 4171477fb5 Silencing a compiler warning about a possibly uninitialized variable.
Patch by Mike Frysinger (from November 2011).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-02 20:17:05 +00:00
Benno Schulenberg a65ef4244c Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 21:36:37 +00:00
Benno Schulenberg e4c34c3386 Adding, fixing, and removing some #endif comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 14:15:57 +00:00
Chris Allegretta 5575bfad2c 2014-02-24 Chris Allegretta <chrisa@asty.org>
* new linter functionality.  rcfile option "linter"
        * src/global.c (shortcut_init) - Actually free the sclist
          if it was allocated before.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-24 10:18:15 +00:00
Chris Allegretta 76d61ec167 2013-01-02 Mike Frysinger <vapier@gentoo.org>
* src/search.c (search_init): Fix gcc complaints on certain versions




git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 05:00:34 +00:00
Chris Allegretta 637daa85c5 * src/*: Retire iso_me_harder_funcmap based on suggestion by <bernd.spaeth@gmx.net>
This does add 20KB to nano's executable size but it gets rid of a lot of indirection
          that makes people stomach turn.  There are several new stub functions and need of more
          tidying as a result of this.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 14:45:56 +00:00
Chris Allegretta df8c3debc8 2010-01-05 Tito <farmatito@tiscali.it>
* search.c (update_history) - Fix bad length check causing search crash on armel platform.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4472 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-05 23:35:50 +00:00
Chris Allegretta 8a07a96eef 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
          file, man pages, UPGRADE file, and update copyright noticed for the current year.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:36:22 +00:00
Chris Allegretta 86988b5026 Oh, reset multi data in search.c;do_replace_loop() too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-17 02:01:03 +00:00
Chris Allegretta 0dc26dcd09 2009-01-24 Chris Allegretta <chrisa@asty.org>
* Add interruptability to search functions.  New functions enable_nodelay and
          disable_nodelay and changes to the routines to handle checking for pending
          searches.  Fixes Savnnah bug 24946: Need interrrupt for search.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-24 22:40:41 +00:00
Chris Allegretta a117163a4c 2009-01-19 Chris Allegretta <chrisa@asty.org>
* Change funcion definitions to shorts instead of (void *)s.  New mapping function
          iso_me_harder_funcmap().  Fixes compilation complaints with -pedantic, 
          reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-19 19:10:39 +00:00
Chris Allegretta 973addcde8 * global.c (shortcut_init), search.c (search_init): Fix add_to_sclist for ^W^T so
invalid messages will display properly.  Fixes Savannah bug 24507.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4343 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-15 01:25:25 +00:00
Chris Allegretta 14c8620e0b - Change add_undo and current_undo to only take action arg, as openfilestruct arg is always openfile
- Add ability to undo a file/cmd insert, needed to add undoable flag to read_file and open_buffer as a result



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-03 04:48:05 +00:00
Chris Allegretta 3c1131a5b3 - Add very basic undo for text replace.
- Fix lots of warnings whe using -Wall
- Fix some comments



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-02 22:31:01 +00:00
Chris Allegretta 1b6ed07543 Add a fix for bug #23144 that actually works (several bugs in one here)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 08:09:05 +00:00
Chris Allegretta 1371fb6326 Tentative fix for bug #23144: using arrow keys in search buffer affects main window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 06:21:31 +00:00
Chris Allegretta 10f868d33c - Update man page a little bit more
- Change do_prompt and get_prompt_line to pass meta_key and func_key
  so the calling program can DTRT when it calsl get_shortcut.  In
  particular this allows the "new file buffer" toggle on the insert file
  menu to work, and presumably other rebinding stuff should now work also.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-14 04:08:51 +00:00
Chris Allegretta 0018d8ed6f - Fix tiny mode again after breaking it again
- Resurrect IFSCHELP to get rid of some needless help message stubs
- Add support for rebinding the suspend key
- Fix wrong refresh help message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-13 08:23:52 +00:00
Chris Allegretta 79a33bb38d New keybindings code and backend. New structs subnfunc for menu functions
and toggles and sc for shortcut keys, old 'shortcut' and 'toggles' structs are
gone.  The current implementation has a bunch of broken stuff (some of which is
documented in BUGS).  Updated nanorc.5 with some mostly complete documentation
on configuring.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-05 07:34:01 +00:00
David Lawrence Ramsey 4fe5edbc11 in do_gotolinecolumn(), use a clearer error message if we enter an
invalid line or column number, per Mike Melanson's suggestion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-11-05 17:18:16 +00:00
David Lawrence Ramsey d8a1d37161 update copyright notices, as Chris Allegretta's copyrights have now been
assigned to the Free Software Foundation; also, make copyright notices
consistent in style


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 05:01:32 +00:00
David Lawrence Ramsey c9694b7636 update copyright notices, as my copyrights have now been assigned to the
Free Software Foundation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-05 16:44:45 +00:00
David Lawrence Ramsey d0035b4ab2 convert to GPLv3 or later
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-11 05:17:36 +00:00
David Lawrence Ramsey a90e6c3240 in do_replace_loop(), fix problem where replacing e.g. single-byte
characters with multibyte ones could result in openfile->totsize's being
miscalculated


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4130 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-09 23:24:37 +00:00
David Lawrence Ramsey 1904f51fb5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4120 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:33:17 +00:00
David Lawrence Ramsey b94d51aa7e more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-19 03:15:04 +00:00
David Lawrence Ramsey 9eaa50d69c more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:42:34 +00:00
David Lawrence Ramsey 61848f172a typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:40:24 +00:00
David Lawrence Ramsey 0ec34ac28a make regexp_init() return a bool instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:35:02 +00:00
David Lawrence Ramsey 6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey b513778b56 in update_history(), fix minor memory leak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-13 00:27:45 +00:00
David Lawrence Ramsey cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey fa38795ef5 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-26 16:50:51 +00:00
David Lawrence Ramsey f968a18a3f in replace_regexp(), remove unnecessary casting of c to int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-13 13:27:16 +00:00
David Lawrence Ramsey ef0d5a7637 handle prepending of wrapped text in one place instead of many, so that
it always works consistently


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-22 02:08:49 +00:00
David Lawrence Ramsey 8f6fb3c6b6 change translator-specific comments in search.c so that they show up in
nano.pot


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 22:22:00 +00:00
David Lawrence Ramsey 572207da79 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 04:22:45 +00:00
David Lawrence Ramsey 20323a82be comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 22:14:40 +00:00
David Lawrence Ramsey e6958d517d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 21:25:04 +00:00
David Lawrence Ramsey 6816007242 make sure browser_refresh() is used when refreshing or doing tab
completion at the prompt in the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-18 21:32:29 +00:00
David Lawrence Ramsey 9d8c284135 allow tab completion of directories at the "Go To Directory" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:11:05 +00:00
David Lawrence Ramsey 4a2e0000f7 fix more bracket matching breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-28 06:04:59 +00:00
David Lawrence Ramsey db2dc81cee fix multibyte bracket search breakage, and add documentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 22:35:52 +00:00
David Lawrence Ramsey d89617fb17 allow specifying matching bracket characters other than the default via
the "matchbrackets" rcfile option


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 21:51:10 +00:00
David Lawrence Ramsey a248863b43 rework the bracket searching code to handle multibyte bracket characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 07:10:30 +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 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 c009ec56f5 breakage and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 13:57:21 +00:00
David Lawrence Ramsey cf9c34acef only include code related to whole word searches when DISABLE_SPELLER
isn't defined, as only the internal spell checker uses it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3190 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 05:59:06 +00:00
David Lawrence Ramsey ebe4b3b52e remove unneeded variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3186 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 03:54:22 +00:00
David Lawrence Ramsey c5c5230b9d overhaul the bracket searching code so that it no longer requires regex
support to work, and add some miscellaneous search code cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 23:45:29 +00:00
David Lawrence Ramsey 6c860c07c8 remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3182 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 21:58:06 +00:00
David Lawrence Ramsey 1c3b211142 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3181 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 21:29:05 +00:00
David Lawrence Ramsey b299a6a0d9 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3180 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 20:32:18 +00:00
David Lawrence Ramsey 979286c65e comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 06:47:22 +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 3f7c8c5158 fix copyright years on source files; all functions in browser.c were
originally added in 2001; the oldest function in color.c is
do_colorinit() (now color_init()), which was originally added in 2001;
the oldest function in chars.c is revstrstr(), which was originally
added in 2001; the oldest function in help.c is do_help(), which was
originally added in 2000; the oldest function in prompt.c is statusq()
(now do_prompt()), which was originally added before 0.6.6, which was
apparently in 1999; all functions in rcfile.c were originally added in
2001; one of the oldest functions in search.c is do_search(), which was
originally added in 0.2.7, which was apparently in 1999; and one of the
oldest functions in text.c is do_wrap(), which was originally added in
0.3.1, which was apparently in 1999; also, for functions originally
adapted from other sources, add notices from the original files, as we
do with the tab completion functions adapted from busybox


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-14 22:20:35 +00:00
David Lawrence Ramsey e19449ec50 actually use statusbar_pww in the statusbar prompt code to cut down on
redundant updates, add related functions to do that, and rename a few of
the statusbar prompt functions for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 21:45:44 +00:00
David Lawrence Ramsey a0168ca896 add new -L/--nonewlines command line option, and new "nonewlines" rcfile
option, to control whether nano adds magiclines to the ends of files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:35:44 +00:00
David Lawrence Ramsey 2ffdea4fc1 tweak a few functions to remove the assumption that the file always ends
in a magicline, and 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@3080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:08:39 +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 4cf2246f04 add missing comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-11 18:30:47 +00:00
David Lawrence Ramsey abd8993660 in update_history(), add a check to make sure the parameter we pass to
renumber() isn't NULL, and update related comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 20:03:58 +00:00
David Lawrence Ramsey db57ad757f comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-31 20:57:38 +00:00
David Lawrence Ramsey 691698a954 move advanced text operations (command execution in a buffer, wrapping,
spell checking, justifying, and word counting) to their own source file,
text.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:57:51 +00:00
David Lawrence Ramsey d1dc23bd78 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2907 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 17:52:36 +00:00
David Lawrence Ramsey 3a9a32996b in do_find_bracket(), add comments and minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2905 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 02:20:01 +00:00
David Lawrence Ramsey 96e6d56571 in find_history() and get_history_completion(), make parameters const
where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-19 04:53:45 +00:00
David Lawrence Ramsey 91d468d7fd for consistency, revert handling of cases where a search string and a
match to it are not the same length in bytes, since the same technique
can't be made to work with tab completion matches


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 19:29:27 +00:00
David Lawrence Ramsey 0e581b3524 make sure that the current position in the history list is properly set
to the bottom if we cancel out of the prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 07:48:50 +00:00
David Lawrence Ramsey 24b1563068 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 05:23:04 +00:00
David Lawrence Ramsey a0aa4df041 properly handle cases where a search string and a match to it are not
the same length in bytes, i.e, when the latter contains invalid
multibyte characters interpreted as normal characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 05:17:59 +00:00
David Lawrence Ramsey 5b44f373fd really fix color breakage by decoupling edit_update() and
edit_refresh(); edit_update() is only called without edit_refresh() in
do_gotolinecolumn() if allow_update is FALSE, and in edit_refresh()
itself if edittop is out of range of current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:47:12 +00:00
David Lawrence Ramsey 8f4762a842 cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:35:11 +00:00
David Lawrence Ramsey 8f1afee813 fix color breakage; also, in main(), when opening files with
"+LINE,COLUMN" arguments on the command line, don't update the screen
when moving to their specified lines and columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 07:06:36 +00:00
David Lawrence Ramsey 0532296a10 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 23:51:52 +00:00
David Lawrence Ramsey db95802a18 add breakage fixes, type fixes, and as-needed color regex compilation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-13 20:18:46 +00:00
David Lawrence Ramsey 5128de8308 fix marking breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 17:40:16 +00:00
David Lawrence Ramsey dbcaa3b1fb fix some breakage caused by the restructuring
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:59:24 +00:00
David Lawrence Ramsey 6ad59cd29b restructure things so that every file has its own openfilestruct, and so
that the values in it are used directly instead of being periodically
synced up with the globals; accordingly, remove the globals; this
changes pretty much every function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2835 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:09:16 +00:00
David Lawrence Ramsey 612b41615b clean up the search code a bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-02 17:56:29 +00:00
David Lawrence Ramsey e3df8788b7 in do_replace(), blank out last_replace properly again just before
displaying the "Replace" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2808 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-02 17:49:27 +00:00
David Lawrence Ramsey 5beae58597 add one missing type change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2792 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 00:17:18 +00:00
David Lawrence Ramsey 2cf6d717f1 add various type changes to avoid problems on systems where int and
ssize_t are different sizes.  Make filestruct->lineno a ssize_t (so that
we can avoid negative line numbers at the "Go To Line" prompt),
current_y a ssize_t (in order to hold the maximum difference between two
filestruct->lineno's), totlines a size_t, and change related variables
to match


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:25:34 +00:00