Commit Graph

309 Commits (c32a58a826a40c1b90a61ee5ab68ced25cb190f2)

Author SHA1 Message Date
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 75d64e677e Handling a SIGWINCH (which signals a change in window size) not when it
happens but only when checking for keyboard input.  It now reports the
SIGWINCH via a special key value to the calling routine, to allow not
only the main editor but also the help viewer and the file browser to
adapt their display to the new size.
Patch by Mahyar Abbaspour, somewhat edited by Benno.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:02:29 +00:00
Benno Schulenberg b454d9c89b Deleting an always-FALSE parameter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 15:17:22 +00:00
Benno Schulenberg ca1983adb4 Eliding another tiny function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 18:47:58 +00:00
Benno Schulenberg 583a30e971 Saving and restoring the global flags the short and quick way.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5211 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 17:37:59 +00:00
Benno Schulenberg f225991b05 Distinguishing a failure to launch the linter from receiving 0 parsable lines.
Adding a new function to glue together the invocation-error string.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-17 09:24:17 +00:00
Benno Schulenberg ce48ca2223 Correcting and adjusting some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-08 19:57:31 +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 6f2da6b9b2 Adjusting the end point of the marked region to compensate
for any change in length of the region's last line.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5169 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 20:16:36 +00:00
Benno Schulenberg 14a9c8aa0b Treating the formatter like a speller,
to fix compilation with --disable-speller.
This fixes Savannah bug #44607.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 16:55:49 +00:00
Benno Schulenberg 0b6d6f45d2 Normalizing some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 13:46:50 +00:00
Benno Schulenberg ff4a457d82 Removing unneeded statement -- nothing has changed the value of 'currmenu'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5161 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-25 16:23:45 +00:00
Benno Schulenberg a37ebcf2f8 Not unsetting the mark before the possible bailout for zero size.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 17:12:49 +00:00
Benno Schulenberg 92142bed34 Avoiding a spell-check error when the marked region is zero bytes long.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 17:01:25 +00:00
Chris Allegretta a0a0556993 2015-02-25 Chris Allegretta <chrisa@asty.org>
* src/text.c (do_alt_speller): timestamp can just be a __time_t.
        Fixes compilation on win32.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 04:32:45 +00:00
Benno Schulenberg a4f28694c8 Removing some leftovers after Mark's patch.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5145 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-21 21:13:03 +00:00
Benno Schulenberg 82d737ee6d Restoring the positions of the mark and the cursor in a better way.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-21 21:02:13 +00:00
Benno Schulenberg 532d55c8bd Making a message equal to another one.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-20 11:37:53 +00:00
Benno Schulenberg 52d1c20973 Not setting the modified flag when an external spell checker
didn't make any changes.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-17 20:10:59 +00:00
Benno Schulenberg 69d26c35fb Fixing a mistaken message plus a few comments too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-14 20:17:21 +00:00
Chris Allegretta 4b3f2771b5 2015-01-03 Chris Allegretta <chrisa@asty.org>
* New formatter code to support syntaxes like
        go which have tools to automatically lint and reformat the text for
        you (gofmt), which is lovely.  rcfile option formatter, function
        text.c:do_formatter() and some other calls.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-03 07:24:17 +00:00
Benno Schulenberg 97a5d1270a Replacing the old get_shortcut() wrapper with the new func_from_key().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-08-29 20:03:58 +00:00
Benno Schulenberg 47dffa483f Using still more the func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 20:16:28 +00:00
Benno Schulenberg a9fdfd0799 Normalizing some tabbing.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5068 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-16 08:53:16 +00:00
Benno Schulenberg 2394e52ebc Making sure line renumbering starts far enough back after
undoing a cut or paste.  And fixing two memory leaks.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5067 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-16 08:46:42 +00:00
Benno Schulenberg 5dde918e24 Not speaking of "line wrap" but of "text add" when undoing/redoing
text additions that caused automatic line breaks.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 19:14:25 +00:00
Benno Schulenberg 637b76b582 Freeing the cutbuffer after use.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5055 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 20:52:27 +00:00
Benno Schulenberg 92213f9de8 Handling the cases of cutting-from-cursor-to-end-of-line
(that is, when CUT_TO_END is set) properly.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 20:29:57 +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 484a0be6e6 Updating the pointer to the bottom of the file
when undoing line deletions at file's end.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 08:49:06 +00:00
Benno Schulenberg 4cf39e4191 Renaming 'undidmsg' to 'redidmsg', to be apt.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 21:26:56 +00:00
Benno Schulenberg 016669128b Fixing three leaks of the cutbuffer, shortening and regrouping some stuff,
and removing an unneeded iteration of cutbottom.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5008 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 11:03:49 +00:00
Benno Schulenberg 07f40612e1 When redoing a line join at the tail of the file,
make sure openfile->filebot is updated.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 10:14:48 +00:00
Benno Schulenberg fb6c0cd20c When undoing a line break at the tail of the file,
make sure openfile->filebot is updated.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:40:30 +00:00
Benno Schulenberg 76e150b47f When undoing a cut-till-end-of-file, put the cursor back
where the cut started, and not at the bottom of the file.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:32:17 +00:00
Benno Schulenberg 3b47ff756e Fixing compilation with --enable-tiny --enable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:13:54 +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 a81e141326 Removing a condition and a break that cancel each other.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 21:23:50 +00:00
Benno Schulenberg 45fe2adf72 Renaming the undo type UNSPLIT to JOIN, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:11:52 +00:00
Benno Schulenberg b39db7bc63 And eliding a totally unused 'strdata2'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:01:30 +00:00
Benno Schulenberg 3cf338aca8 Eliding the in fact unneeded 'to_eof'
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:59:12 +00:00
Benno Schulenberg c55c0db2bb Renaming 'to_end' to 'to_eof', to lessen confusion with CUT_TO_END.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:46:35 +00:00
Benno Schulenberg a872709ab4 Making sure the cutbuffer is cleared at the appropriate moments.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:04:35 +00:00
Benno Schulenberg e96022b923 After an undo or redo, update the 'placewewant'.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:50:34 +00:00
Benno Schulenberg 38cb8fc328 Removing an obsolete boolean variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:37:34 +00:00
Benno Schulenberg 948b8e9bcf Putting the cursor back in front of a backwards cut,
where it was when the cut was made.
Patch by Mark Majeres, edited by Benno Schulenberg.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-14 14:08:28 +00:00
Benno Schulenberg 736fbf2e3f Removing the --undo option, having the undo functions always enabled.
If wished, the user can unbind them.  This fixes Savannah bug #42456.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 15:20:26 +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