Commit Graph

481 Commits (3b47ff756e9d997fb85296cad3a51b13c2d287ba)

Author SHA1 Message Date
Benno Schulenberg b0555990c2 Fixing compilation with --enable-tiny --enable-browser.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 15:35:26 +00:00
Benno Schulenberg 492e9f605b Miscellaneous whitespace adjustments and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:48:26 +00:00
Benno Schulenberg ac6846a3e9 Wrapping long lines and actually reporting the name that is not a directory.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:39:31 +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 d840302f28 Updating some comments to match the current state of affairs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 13:08:23 +00:00
Benno Schulenberg 4f3f976030 Displaying "No file name" on the statusbar for two seconds
when --tempfile was given and the current buffer has no name.
This fixes Savannah bug #41750.  Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 20:44:34 +00:00
Benno Schulenberg a8a23abc00 Making a couple of minimalistic whitespace adjustments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:12:14 +00:00
Benno Schulenberg 1102aaa374 Making tiny nano a bit tinier by preening out some soft-wrap stuff.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 20:26:54 +00:00
Benno Schulenberg acda255b47 A bunch of type fixes, mostly in debugging messages --
line numbers are long, x positions unsigned long.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 15:08:59 +00:00
Benno Schulenberg 505125e259 A few cosmetic tweaks of comments and whitespace.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 14:23:53 +00:00
Benno Schulenberg 04a38da312 Allowing the toggle between Read File and Execute Command to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 19:15:16 +00:00
Benno Schulenberg 1eb23d4988 Making use of the macros charalloc() and charealloc(), making use of
null_at(), adding a cast, and using an unsigned type for a length.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 16:30:11 +00:00
Benno Schulenberg 1de337de9c Normalizing whitespace, comments and interpunction, in various places.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 16:02:51 +00:00
Benno Schulenberg 044e4d2ae0 A few more comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 21:11:59 +00:00
Benno Schulenberg 71c9a5245a Several random whitespace and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 20:14:01 +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 11d76449d2 Make help lines show "Close" again when more than one buffer is open.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4816 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-26 19:01:18 +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 db7064b8e6 Adding the command-line option --noread to treat any name
on the command line as a new file.  Patch by Hans Alves.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:59:30 +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 d0dec31778 Reformat some comment blocks, fix a few typos, and remove a few unneeded
blank lines.  Patch by David Lawrence Ramsey was lightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4750 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 12:35:18 +00:00
Benno Schulenberg a2dcd6edce Dropping the obsolete argument of shortcut_init(),
and removing two unneeded calls of this function.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-07 09:24:10 +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 f14096e286 Avoiding two more compilation warnings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 07:50:41 +00:00
Benno Schulenberg d17438bd1d Converting #ifdef NANO_EXTRA to #ifndef DISABLE_EXTRA.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-03 20:57:44 +00:00
Benno Schulenberg 0636d7b797 Converting #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-03 20:23:07 +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
Benno Schulenberg ae092b90d8 Fix a typo and two inconsistent spellings in three statusbar messages.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-25 17:12:58 +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
Benno Schulenberg 4abf9449b4 Adding a missing malloc, to avoid a segfault on some systems.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 20:44:43 +00:00
Benno Schulenberg d6e39724d8 Adding four needed compilation conditions on ENABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 16:26:30 +00:00
Chris Allegretta 2d34586c43 * src/files.c (write_file): Don't re-stat() the file if we're writing out
a marked file (especially that would give it the wrong stat info).  Part
          2 of issue reported by Benno Schulenberg.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-04-13 02:56:03 +00:00
Chris Allegretta 6251358746 2013-04-12 Chris Allegretta <chrisa@asty.org>
* src/files.c (do_insertfile): Check for saved cursor position when inserting a
          file as well.  Fixes Savannah bug 38600 reported by Craig Barnes.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-04-12 06:43:06 +00:00
Chris Allegretta 2a76b434fc 2013-01-02 Mike Frysinger <vapier@gentoo.org>
* src/files.c: (cwd_tab_completion): Remove unnecessary variables



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 04:50:49 +00:00
Chris Allegretta 3116d2f7de Fix impromper calls to nmalloc in new locking implementation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 04:36:39 +00:00
Chris Allegretta 4cc2462ed4 Clean-up warnings with -pedantic.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 04:23:10 +00:00
Chris Allegretta d70c7f3c14 Implement the modification bit of the .swp file, put it in the correct actual
location (pos 1007).



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 03:36:20 +00:00
Chris Allegretta 21f73f902f Fix trying to lock an un-writable directory. Just put a message
on the statusbar that we couldn't do it if the user modifies the file.
Changes to do_lockfile and write_lockfile to check for EACCESS and change
the return value of the functions (0 instead of -1)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 03:07:27 +00:00
Chris Allegretta bf88d27adc 2012-12-31 Chris Allegretta <chrisa@asty.org>
* src/*: Introduce (basic) vim-style file locks.  Does not allow vim to recover
          our files, and doesn't yet support setting the file as modified; just lets a 
          vim user know we're editing a file.  Commands line "-G" or "--locking", nanorc 
          option "locking".  New functions src/files.c:do_lockfile(), write_lockfile(),
          and delete_lockfile().



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-01 03:24:39 +00:00
Chris Allegretta 2ad1de0ba6 Remove trailing spaces on source files as they suck
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2012-12-30 19:20:10 +00:00
Chris Allegretta 3459e4f432 2011-02-23 Chris Allegretta <chrisa@asty.org>
* Fix some more severe warnings from 'g++ -pedantic', from patch originally
          by Eitan Adler <lists@eitanadler.com>



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4534 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-24 02:47:25 +00:00
Chris Allegretta 392c23c9c5 * files.c (load_history): Set last_search to the last search value we loaded from history,
so do_research will succeed without needing to manually load the last seach in.  Fixes
          bug reported by Matt "ML" at gmail.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4531 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-18 07:49:28 +00:00
Chris Allegretta 8e2a930714 2011-02-18 Chris Allegretta <chrisa@asty.org>
* New saved cursor position history option.  Command line option -P or --poslog, rc file
          entry "poslog".  Search history changes to ~/.nano/search_history, cursor position log
          is ~/.nano/filepos_history.  Added checks to move the legacy .nano_history file to the new
          location.  Several new functions to files.c: load_poshistory(), save_poshistory(),
          check_poshistory(), update_poshistory(), and reworking of histfilename().  New FAQ entry
          4.15 discussing the change and offering an interoperability workaround.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-18 07:30:57 +00:00
Chris Allegretta 9bfda9196b Checkpoint commit of saved file position implementation in case my desktop bites it.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4529 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-16 06:52:30 +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 3d411188f6 2011-02-06 Chris Allegretta <chrisa@asty.org>
* files.c (write_file) - Fix problems with writing the backup file (albeit interactively)
	  with new function prompt_failed_backupwrite(), allows more secure handling of problems
	  with failing to write the backup file compared to 'allow_insecure_backup'.
	* winio.c (edit_redraw): Removed unused variable



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 02:06:20 +00:00