Benno Schulenberg
aff252aed6
Removing two lines of dead code.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 17:42:32 +00:00
Benno Schulenberg
08d9f572a4
Unwrapping some lines and rewrapping some others in a more congenial manner;
...
tweaking some comments and whitespace and braces.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 17:25:51 +00:00
Benno Schulenberg
93e391eba3
Renaming a variable.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5288 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 15:57:49 +00:00
Benno Schulenberg
9fcde23009
Plugging a small memory leak.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 15:54:06 +00:00
Benno Schulenberg
38e8ed14ca
Normalizing the whitespace and some comments in src/files.c.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:10:58 +00:00
Benno Schulenberg
ecffb85656
Forgetting the case of an empty filename for replace_buffer(),
...
and not bothering to put the pointer at the top.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5269 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:03:45 +00:00
Benno Schulenberg
c32a58a826
Not checking for non-NULL before freeing a variable, as it's unnecessary.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 19:14:41 +00:00
Benno Schulenberg
f111c0d6ab
Limiting the number of backup files to one hundred thousand, well
...
before finding a unused filename takes an annoying amount of time.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-08 21:11:30 +00:00
Benno Schulenberg
d8b6dbfffe
Letting bottombars() set the global variable 'currmenu'.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 14:16:07 +00:00
Benno Schulenberg
1b65b19abd
The user does the editing, not the editor. So rephrasing.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-15 16:28:08 +00:00
Benno Schulenberg
35cd49ec50
Also showing the name of the affected file when finding a lock file,
...
for when many files are opened at once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5117 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-15 16:20:09 +00:00
Benno Schulenberg
bd98ff02f6
Avoiding to trim the nano version number on the status bar.
...
Patch by Kamil Dudka.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 10:07:08 +00:00
Benno Schulenberg
057ef182cd
Avoiding to print a wrong PID on the status bar.
...
Patch by Kamil Dudka. Bug reported by Don Swaner.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5110 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:58:02 +00:00
Benno Schulenberg
67cdd5ee1e
Making sure that 'lockprog' and 'lockuser' are properly terminated.
...
Patch by Kamil Dudka.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:48:50 +00:00
Benno Schulenberg
92896a708d
Avoiding to write uninitialized bytes to the lock file.
...
Patch by Kamil Dudka.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:39:27 +00:00
Chris Allegretta
5b1fb56a8f
Take 2 at file locking fixes. New args to close_buffer() and
...
switch_to_prevnext_buffer() to support message passthrough
when trying to lock files using multibuffer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5105 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-20 06:15:34 +00:00
Chris Allegretta
6948d2e779
2015-01-13 Chris Allegretta <chrisa@asty.org>
...
* src/files.c (open_buffer): Check here for locking and properly
handle choosing to not open a file when locked instead of in
open_file(). Fixes Savannah bug 42373 reported by Benno Schulenberg
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-14 02:36:30 +00:00
Benno Schulenberg
e99f0b609b
Gettextizing the "File being edited" prompt,
...
and improving its wording.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 21:58:27 +00:00
Benno Schulenberg
fcd4468f90
Adjusting some indentation.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-31 20:44:19 +00:00
Benno Schulenberg
7239fda971
Using still further the func_from_key() wrapper instead of get_shortcut().
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5084 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 21:07:15 +00:00
Benno Schulenberg
300e27745b
Refixing a typo in a statusbar error message.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 18:35:08 +00:00
Chris Allegretta
733ca94f8e
2014-07-11 Chris Allegretta <chrisa@asty.org>
...
* src/files.c (do_lockfile, open_file): If locking fails,
allow the lock failure message to be preserved AND
preserve the filename passed on the cmdline. Fixes
Savannah bug #42668 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 11:16:15 +00:00
Chris Allegretta
a9c3bbf8e0
files.c:do_lockfile(): Actually reference the variable we're using for the dir.
...
Also name it more appropriately.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5058 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 10:39:38 +00:00
Chris Allegretta
6d5b2fd936
2014-07-02 Chris Allegretta <chrisa@asty.org>
...
* src/files.c (do_lockfile): Check whether the directory
of the file we're trying to lock exists, and make the
resulting error message more intuitive. Fixes
Savannah bug 42639 by bens.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5056 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-03 03:54:22 +00:00
Benno Schulenberg
49816fed70
Now that 'currmenu' is really global, stop passing it around.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 10:41:10 +00:00
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
45417c76f3
Giving audible feedback when flipping the new buffer to off
...
is not allowed in view mode.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 20:30:23 +00:00
Benno Schulenberg
691689d2b3
Fixing compilation with --enable-tiny --enable-histories --enable-multibuffer.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:33:12 +00:00
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