Commit Graph

734 Commits (ee33503402c1af31216694f3776dfd15d898e82d)

Author SHA1 Message Date
Benno Schulenberg ee33503402 Using the main multidata-cache-allocation routine.
(Note that there can only be colorstrings when there /is/ a syntax,
so there is no need to check for the latter here.)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-29 13:20:08 +00:00
Benno Schulenberg e19a16f0e6 Always setting the multidata to CBEGINBEFORE when an end is found,
also when the coloured part is horizontally scrolled off.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-29 12:31:49 +00:00
Benno Schulenberg f08d79d204 Making Ctrl+Left and Ctrl+Right work on more terminals by asking
ncurses for the keycodes.  This addresses Debian bug #800681.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-23 08:52:23 +00:00
Benno Schulenberg bde996db67 Discarding a now useless function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5403 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 19:56:35 +00:00
Benno Schulenberg 02a3a25aa0 Skipping a zero-length match only when there /is/ a match.
(Finally I understood what valgrind was complaining about.)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5398 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-10 10:39:12 +00:00
Benno Schulenberg 53fbcf77f2 Not checking whether a function has a help line; it's irrelevant.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-06 20:25:05 +00:00
Benno Schulenberg 954d04bc59 Forcing a redraw of a line only when it contains a multicolumn character,
as that is the only known situation where things go wrong.  This spares
all regular text a significant slowdown.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-09-05 09:14:24 +00:00
Benno Schulenberg 90798fbfba Allowing to toggle whitespace display also when support for nanorc files
has not been built in, since the default values are quite usable.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 16:05:50 +00:00
Benno Schulenberg 2a5bd555e7 Putting in the null byte "manually", and only when using UTF-8.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-08 08:10:57 +00:00
Benno Schulenberg 74e7521478 Adjusting some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-18 10:32:01 +00:00
Benno Schulenberg 3f1878d9a9 Looking for a new start only after an end,
instead of right after the last start.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5307 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-18 07:34:27 +00:00
Benno Schulenberg 1f866c29db Renaming the 'menu' item to 'menus' in the shortcut struct.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5301 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-15 20:13:05 +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 75ac24b25e Verifying that there exists multidata for the found starting line
before trying to use this multidata -- when a file is inserted, all
its lines will not have any multidata associated with them.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-23 18:06:30 +00:00
Benno Schulenberg 26ae9dbd12 Not bothering to look for any starting matches on the current line
when the whole line has already been coloured.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 18:06:36 +00:00
Benno Schulenberg d49c267f91 Skipping to the next step when a found start has been qualified as
an end earlier.  This helps with Python's triple-quoted strings.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 17:56:44 +00:00
Benno Schulenberg 2e121fa08c Adding some debugging code to track which multidata codes get assigned.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5246 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 15:58:57 +00:00
Benno Schulenberg e00b3e8587 Making it easy to see what codes a key stroke produces when debugging.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-11 19:01:28 +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 7f3bd26593 Unwrapping a bunch of comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5220 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-28 20:09:40 +00:00
Benno Schulenberg 7edd350593 Fusing two identical functions into one: need_screen_update().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 08:16:41 +00:00
Benno Schulenberg 455a918071 Making sure an invalid starting byte of a multibyte sequence is properly
terminated, to prevent the displaying of ghost characters.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5206 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-18 20:07: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 7fe830fd20 Only scrolling the required number of lines
when pasting lines onto the bottom line.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5171 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-28 17:11:28 +00:00
Benno Schulenberg 07e199ff0e When searching, put a found off-screen string on the center line
instead of at the bottom or top, to show it in context.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5170 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-28 17:01:46 +00:00
Benno Schulenberg 2456dd2a85 Not centering the current line when smooth scrolling is used.
This fixes Savannah bug #42654.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-22 13:23:42 +00:00
Benno Schulenberg 57fa775f25 Updating the copyright years to include 2015.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:32:02 +00:00
Benno Schulenberg 8d53aa3ad2 Adding a general entry for all translators plus the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:19:58 +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 a44def03a0 Adding Mark to the scroll.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 22:27:56 +00:00
Benno Schulenberg 9f1b1e2b14 Removing the names of past translators from the Easter-egg scroll.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5098 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 22:23:31 +00:00
Benno Schulenberg 6c86ee1a5b Deleting old wrapper 'getfuncfromkey()', and replacing its call
with a call of the new wrapper 'func_from_key()'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 19:12:38 +00:00
Benno Schulenberg 3cd3e32ec3 There are no tagless functions, so there is no need to check.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5044 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 10:52:07 +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 09dd0a4acb Making Ctrl-Left and Ctrl-Right produce special codes,
and mapping these codes to Prevword and Nextword.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 20:53:00 +00:00
Benno Schulenberg 26de2dd843 Normalizing some indentation and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 20:01:27 +00:00
Benno Schulenberg ce0ea44596 Renaming UP_DIR and DOWN_DIR to UPWARD and DOWNWARD, for clarity,
to reduce the slight confusion with DIR meaning directory.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 18:20:12 +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 cd59a646e6 Not treating the holding of both Control and Meta the same as only Control.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 14:58:02 +00:00
Benno Schulenberg 62bb6e85fc Setting not just the meta_key but also the func_key boolean when a key is
reinserted into the keyboard buffer.  This fixes Savannah bug #42092.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 19:24:38 +00:00
Benno Schulenberg a3f421ca2b Producing the correct return value for when a mouse event reinserted something
into the keyboard buffer.  And not continuing but getting out when there is a
spurious  mouse event.  Continuing would result in the cutbuffer being cleared
upon the next cut.  These two changes together fix Savannah bug #42326.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 18:04:36 +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 53435b0efc One more type fix and two tiny message tweaks.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4953 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:07:47 +00:00
Benno Schulenberg 6af5bdea27 A few more cosmetic tweaks and type fixes.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4952 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 20:41:15 +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 ed0086bde5 Eliding four function calls by not comparing with an
empty string but checking for the terminating '\0'.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4949 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 14:33:00 +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 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