Commit Graph

1007 Commits (c0fa3f04b1f32e5c7b5e996eb9a78f777acc2edb)

Author SHA1 Message Date
Benno Schulenberg d12fdda15b tweaks: replace a three-case switch with an if and an else 2016-07-31 18:10:01 +02:00
Benno Schulenberg 1c9ab8bf16 tweaks: rename a struct element, to be more fitting
The keycode is not a sequence; it is a single integer value.
2016-07-30 12:24:35 +02:00
Benno Schulenberg e295070193 shortcuts: group the setting of key string and keycode into one function
And instead of using two key types, just use a bool to indicate whether
a keystroke involves Meta.
2016-07-30 12:21:42 +02:00
Benno Schulenberg 91951ab22a input: don't bother putting a keycode into byte range
A keycode is either already in byte range (so there is nothing to do)
or it is not and it shouldn't be (so there is nothing to do either).
2016-07-30 12:19:47 +02:00
Benno Schulenberg 5b0ab8be62 shortcuts: remove any unnecessary classifying of keys
After initialization, the type of a key is never used nor needed
(other than for meta keys).
2016-07-30 12:13:47 +02:00
Benno Schulenberg ecef093def tweaks: adjust indentation after previous changes 2016-07-29 09:33:28 +02:00
Benno Schulenberg 6d6f5bd4a7 tweaks: check earlier on for sufficient length of the sequence 2016-07-29 09:33:28 +02:00
Benno Schulenberg e3dbffc9f7 input: be more strict in recognizing certain escape sequences
Accept the "Esc [ 1 n ~" and "Esc [ 2 n ~" sequences only when they
end with the "~" character, not with any character.
2016-07-29 09:33:28 +02:00
Benno Schulenberg 2225d54126 input: don't use a function call when a literal value will do 2016-07-29 09:33:28 +02:00
Benno Schulenberg 9115828e76 input: fix a pasto from eight years ago, from commit e347efb 2016-07-29 09:33:16 +02:00
Benno Schulenberg f3e8991206 credits: don't bother blanking the second line nor the help lines
Those lines don't exist in that mode -- the relevant subwindows are
smaller, or have been made smaller just before.
2016-07-27 12:40:11 +02:00
Benno Schulenberg 68cfb08888 tweaks: fix compilation with --enable-tiny 2016-07-25 17:29:24 +02:00
Benno Schulenberg a472f480a7 tweaks: trim some comments, and simplify a condition 2016-07-24 13:44:16 +02:00
Benno Schulenberg 4416d9c941 tweaks: shuffle the resetting of a counter to the tail of the routine 2016-07-24 13:15:45 +02:00
Benno Schulenberg c073c5ae54 tweaks: don't bother resetting the Unicode code holder
It will be initialized when a new code is started.
2016-07-24 13:09:24 +02:00
David Lawrence Ramsey fc0ddab349 input: provide feedback on the Unicode digits typed so far
This fulfills https://savannah.gnu.org/bugs/?48154.
2016-07-24 12:19:42 +02:00
Benno Schulenberg c6dbcf91c3 new feature: functions to jump to previous or following block of text
And hard-bind the keys Ctrl+Up and Ctrl+Down to these functions.

Unlike the paragraph-jumping code, these new functions disregard
any indentation, treating only blank lines as separators.  They
also do an automatic smart home when that option is set.

This fulfills https://savannah.gnu.org/bugs/?48291.
2016-07-24 12:00:00 +02:00
Benno Schulenberg 8c7a38596d screen: include a workaround only when compiling against older ncurses
The bug with a leading wide character has been fixed since ncurses-5.9.

See https://savannah.gnu.org/bugs/?31743 for reference.
2016-07-24 10:38:31 +02:00
Benno Schulenberg 1c2d2a4027 tweaks: adjust a comment for removed definitions 2016-07-22 15:57:20 +02:00
Rishabh Dave 4c566c7903 tweaks: reduce the number of wattron/wattrof calls
Also, compose the coloring attributes during initialization
instead of every time when painting something.

Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-07-21 10:10:59 +02:00
Benno Schulenberg 73a07215cc debug: remove duplicate information 2016-07-21 09:54:07 +02:00
Benno Schulenberg 103dd06347 input: don't crash when the window is resized during verbatim input
Instead of referring to a window that might have been deleted by a
resize, just turn the keypad back on for the two windows from which
input might have been requested.

Also: don't insert KEY_WINCH as the verbatim keystroke.

This fixes https://savannah.gnu.org/bugs/?48532.
2016-07-17 12:18:12 +02:00
Benno Schulenberg 1d4c1e0bfc input: plug a memory leak
This fixes https://savannah.gnu.org/bugs/?48538.
2016-07-17 12:00:33 +02:00
Benno Schulenberg a37cd9f0ef tweaks: rename a variable, to clarify it refers to columns, not to bytes 2016-07-14 14:28:15 +02:00
Benno Schulenberg b4babc2036 input: accept only the four iTerm sequences that actually get handled
This fixes https://savannah.gnu.org/bugs/?48455.
2016-07-13 13:01:46 +02:00
Benno Schulenberg f2150d3f98 input: treat Ctrl+Alt+key different from Esc followed by Ctrl+key
When the user changes her mind after having pressed Esc, she cannot
unpress Esc, so do that for her by ignoring the escape code when
the subsequent keycode is outside of the normal printable range.

This restores the behavior from before nano-2.3.5 -- except that
Ctrl+Alt+key continues to report an unbound key.

This fixes https://savannah.gnu.org/bugs/?48459.
2016-07-13 10:01:07 +02:00
Benno Schulenberg 033376aec0 input: consider only O, o and [ as starters of multi-character sequences
This prevents many keycode sequences from being misconstrued when a
command key plus other keystrokes accumulate in the input buffer.

This fixes https://savannah.gnu.org/bugs/?48395.
2016-07-13 09:56:24 +02:00
Benno Schulenberg e33a0b6dbe screen: avoid converting each character twice from multibyte to wide 2016-07-12 19:41:13 +02:00
Benno Schulenberg 0894587305 screen: elide another intermediate buffer for every visible character 2016-07-12 19:30:50 +02:00
Benno Schulenberg 960e848cc7 tweaks: elide a typedef, as it now has just one element 2016-07-12 09:35:48 +02:00
Benno Schulenberg 8507dd4bd0 color: integrate the hilite attribute into the pair number
Color-pair numbers and attributes can be OR'd together -- do so,
to save an attron() call whenever the hilite is on.
2016-07-12 09:20:09 +02:00
Benno Schulenberg d2b25120f0 tweaks: fuse two handlings of a delete key, and fix a comment 2016-07-10 21:36:25 +02:00
Benno Schulenberg 0c319f8b4b tweaks: put the case labels (the keycodes) in a more sensible order 2016-07-10 20:49:52 +02:00
Benno Schulenberg 4fcc760158 tweaks: put some case labels closer to their statements
Also condense some comments, and group keys with the same result together.
2016-07-10 20:38:08 +02:00
Benno Schulenberg 0d5f918453 input: add some missing keycodes to the parsing routine
Add them so that <Esc> followed by <Home> will simply do "Home" instead of
reporting an unbound key.  The same for <End>, <PageUp> and <PageDown>.

This restores the behavior from before nano-2.3.5.
2016-07-10 20:21:11 +02:00
Benno Schulenberg 91fff2a2c8 screen: avoid looking up the width of whitespace and control codes
Spaces and tabs and control codes never are multi-column glyphs, so
only look up the width for "normal", visible characters.
2016-06-30 14:32:10 +02:00
Benno Schulenberg d6f43bd156 screen: elide the intermediate buffer for every single character 2016-06-30 14:29:14 +02:00
Benno Schulenberg ebbe546033 screen: again, look at the bytes in their context
This avoids having to null-terminate every single-byte character.
2016-06-30 14:28:29 +02:00
Benno Schulenberg cf0eed6c36 screen: don't check for every character whether there is still enough space
Just allocate ample space up front and thus discard the delaying 'if' for
each and every character.  In most cases this will allocate far too much,
but that hardly matters: it is freed again as soon as the line is printed.
2016-06-30 14:27:00 +02:00
Benno Schulenberg feacacc46d chars: look at bytes in their context, so only valid sequences are accepted
This fixes https://savannah.gnu.org/bugs/?48125.

(The fix is slightly wasteful; speeding things up will follow later.)
2016-06-29 20:56:50 +02:00
Benno Schulenberg 622995fb12 chars: the representation of a control character is always two bytes
Any control character is represented by a ^ plus an ASCII character.
2016-06-29 20:56:50 +02:00
Benno Schulenberg 1d7c177606 input: don't drop a keystroke on the floor when the terminal resizes
This fixes the first part of https://savannah.gnu.org/bugs/?48331.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2016-06-29 15:53:08 +02:00
Benno Schulenberg 2ae490cd8f build: refresh the git description whenever something is recompiled
This fixes https://savannah.gnu.org/bugs/?47962 reported by Cody Taylor.
2016-06-27 19:45:21 +02:00
Benno Schulenberg ddd9c7a022 tweaks: try to distinguish between keystrokes and characters
Keystrokes are single integers (aided by the flags meta_key and
func_key) but in the input stream they can be encoded as escape
sequences (a series of bytes).  Characters are values in byte
range, but in UTF-8 one character can consist of multiple bytes.

Also rename two variables, because the secondary input buffer
that they refer to contains only characters (mostly just one),
never any shortcuts; and there are too many "kbinput" already.
2016-06-25 20:34:09 +02:00
Benno Schulenberg 03c689c22c tweaks: normalize a type, and rewrap a line 2016-06-25 20:33:11 +02:00
Benno Schulenberg f33796bee1 tweaks: elide an impossible case
Typing a Unicode code is always finished after at most six characters:
either retval == uni or retval == kbinput, but it can't be ERR.
2016-06-25 16:52:36 +02:00
Benno Schulenberg e679c518b1 tweaks: elide an unneeded variable 2016-06-25 16:52:36 +02:00
Jordi Mallach c2b199e926 docs: use https for nano-editor.org, and drop the www
Switch to https and drop the www. prefix for all occurrences of the
website URL.
2016-06-23 19:51:01 +02:00
Benno Schulenberg 95f417fa9a tweaks: rewrap a bunch of lines and some comments 2016-06-20 13:05:45 +02:00
Benno Schulenberg 21d9bd1107 tweaks: rename some variables to be more readable 2016-06-01 13:04:32 +02:00
Benno Schulenberg 5864d97590 tweaks: harmonize the routine for tabs with the one for spaces 2016-06-01 13:04:22 +02:00
Benno Schulenberg 3ac37642c8 screen: check for the most frequent character first: a space 2016-06-01 13:04:08 +02:00
Benno Schulenberg a9f79a6130 tweaks: reindent and rewrap a few lines, and shorten a comment 2016-06-01 13:03:26 +02:00
Benno Schulenberg 17cf833b9c tweaks: normalize some whitespace 2016-05-30 09:09:36 +02:00
Benno Schulenberg e0e788e218 tweaks: reshuffle a few things 2016-05-23 21:34:02 +02:00
Benno Schulenberg c8f530af93 statusbar: add a non-beeping message type that does not get overwritten
Error messages about lock files should not get overwritten by purely
informational messages, only by alerting ones.

This fixes https://savannah.gnu.org/bugs/?47963.
2016-05-21 13:58:09 +02:00
Benno Schulenberg a878f5f183 screen: catch a window resize also when the keyboard is in nodelay mode
This fixes https://savannah.gnu.org/bugs/?47954.
2016-05-18 11:14:17 +02:00
Benno Schulenberg 5cbaf5903b tweaks: rearrange some key reading stuff in a clearer way 2016-05-18 10:36:37 +02:00
Benno Schulenberg cdcd365d34 tweaks: normalize some whitespace 2016-05-17 11:33:21 +02:00
Benno Schulenberg 2535f51e01 statusbar: prevent error messages from overwriting each other
If during startup there are multiple error messages, currently only the
last one remains and can be read.  To improve on that, introduce a short
pause between error messages -- even if it's not enough to read them all,
at least the user will be aware that there are multiple ones.

This also causes a few error messages to beep that currently don't beep,
such as when a file is unwritable.
2016-05-16 18:03:07 +02:00
Benno Schulenberg 2503503a2a tweaks: make the conditions for statusbar blanking more transparent 2016-05-15 11:36:51 +02:00
Benno Schulenberg 2cd21da4f0 tweaks: remove the fiddling with an unrelated setting
CONST_UPDATE is only relevant when in the main menu, not when in the
browser.  So, check for that condition, instead of saving, changing,
and then restoring the setting.
2016-05-15 11:22:44 +02:00
Benno Schulenberg 681f042326 tweaks: remove a superfluous condition
CONST_UPDATE does not need to influence the delay for blanking the
statusbar; it is enough when it simply prevents it.
2016-05-15 11:17:27 +02:00
Benno Schulenberg 73aa48b772 input: after an unknown sequence, reenable cursor only when in main menu
When in the browser, typing keys that produce an unknown escape sequence
should not switch on the cursor.
2016-05-14 22:14:37 +02:00
Benno Schulenberg 6698659149 screen: displaying the cursor position should not suppress it next time
Take the side effect of a 'statusbar' call -- setting suppress_cursorpos
to TRUE -- into account.  This effect was overlooked by commit 9d6d5b6.
2016-05-14 21:49:19 +02:00
Benno Schulenberg c918c6563b input: properly restore waiting mode, or retain non-waiting mode
Cancelling a search should restore waiting mode for the keyboard,
just like at the other exit points of the search routine.

And when the input routine has read in multiple keystrokes, it
should not blindly switch back to waiting mode, but only when
that mode was on before.

This fixes the second half of https://savannah.gnu.org/bugs/?47438.
2016-05-06 09:30:55 +02:00
Benno Schulenberg 577f7fafa9 screen: make better use of the available space in the titlebar
When the terminal is very narrow, there is little point in showing only
part of the version string -- and chewing off one or two digits from the
version number might even give someone a wrong idea.  The user is better
served with always showing the full filename, as long as it fits in the
available screen width.

This fixes https://savannah.gnu.org/bugs/?47703.
2016-05-05 20:09:10 +02:00
Benno Schulenberg a7c158d07d input: simplify a bit of code, reducing a four-case switch to a single if 2016-05-05 13:21:19 +02:00
Benno Schulenberg 9d6d5b679a screen: rename a variable, because 'disable' sounds too permanent 2016-05-04 12:18:21 +02:00
Benno Schulenberg 402cf718c4 input: trim some oververbose comments 2016-05-04 09:56:28 +02:00
Benno Schulenberg 7b3649abc9 input: don't take multiple keystrokes to be a single sequence
For some reason the keyboard code seems to assume that all integers
waiting in the keybuffer form a single sequence.  But this isn't the
case: when there is an escape (0x1b) among them, then that is where
a new sequence starts.  So, prevent the input code from considering
an escape after a non-escape as part of the current sequence.

This fixes https://savannah.gnu.org/bugs/?47839.
2016-05-04 09:56:15 +02:00
Benno Schulenberg e666f8c50d input: write a few ifs more compactly 2016-05-02 21:58:43 +02:00
Benno Schulenberg eb871e72f5 input: distinguish an unknown escape sequence from an unbound key
It is misleading to say "Unknown Command" when there is no way to rebind
the relevant key stroke do anything useful.
2016-05-01 22:04:17 +02:00
Benno Schulenberg b26aaa7e42 screen: fix compilation when configured with --enable-tiny 2016-04-27 17:45:36 +02:00
Benno Schulenberg 53f4a9f5a8 screen: rename 'edit_refresh_needed' to 'refresh_needed'
For a little contrast with the function edit_refresh() -- it's
annoying that when you search for the latter you get to see all
the settings of the flag too.
2016-04-25 21:14:18 +02:00
Benno Schulenberg b97c36c218 screen: don't always set 'edit_refresh_needed' when adjusting edittop
The function edit_update() is called by edit_refresh() itself, so it is
silly that the first sets 'edit_refresh_needed' to TRUE.  This setting
is needed only in a few cases -- in the others it's not needed because
the screen does not need to be refreshed (it was just about positioning
the cursor), or 'edit_refresh_needed' has already been set by a call to
goto_line_posx().  So, just set the flag in the five places that need it
and spare the other four calls.
2016-04-25 20:17:40 +02:00
Benno Schulenberg a101b30fa8 keyboard: reshuffle some lines to avoid an empty while 2016-04-16 11:57:05 +02:00
Benno Schulenberg 0bffd99dcb scrolling: elide a variable, to make clearer that edittop is being moved 2016-04-16 11:38:39 +02:00
Benno Schulenberg 6414f9f000 titlebar: snip two superfluous tests for having enough space
If nano has less than four columns available, it will die,
so there will always be room for at least four characters.
2016-04-13 17:54:06 +02:00
Benno Schulenberg 2246029447 screen: elide a variable and serialize some logic for clarity
Also, don't force a full refresh of the edit window simply because the
current line needs to be horizontally scrolled.  And further, when the
adjustment of edittop has determined that a full refresh is needed,
get out and don't bother scrolling some lines first.
2016-04-13 13:19:24 +02:00
Benno Schulenberg ec295f5e68 build-sys: detect a build from git and show its short commit hash 2016-04-12 10:28:45 +02:00
Benno Schulenberg 4b5b66a806 screen: avoid redrawing a line twice
The old_current line needs to be redrawn only if it differs from current,
and if it wasn't drawn already by the iteration for when the mark is on.

Also make the conditions involving horizontal scrolling more precise.
2016-04-11 20:40:21 +02:00
Benno Schulenberg aa1ae0a144 screen: concentrate the setting of placewewant
Instead of saving the current value of placewewant, then setting the
new value, and then passing the old value to edit_redraw() in seven
different places, just let edit_redraw() do this saving and setting.

In the bargain placewewant is now only recalculated when it matters
-- when allow_update is TRUE -- and not when it's superfluous.
2016-04-11 20:38:05 +02:00
Benno Schulenberg cb17732ac2 scrolling: don't scroll too much when having to bridge blank lines
Add a third mode of scrolling, FLOWING, besides CENTERING and STATIONARY.
This is used for word and paragraph jumping (and for bracket matching,
but that worked correctly already), and only when focusing is FALSE.

The new mode prevents the screen from scrolling too many lines when
there are several blank lines at the bottom of the edit window and
the next word or paragraph is out of view.

This fixes https://savannah.gnu.org/bugs/?47194.
2016-04-07 14:28:25 +02:00
Mike Scalora d851ccdd41 keyboard: recognize four escape sequences produced by iTerm2
On iTerm2 on OS X, the Option+Arrow keys produce special sequences
that start with two escapes.  Catch these sequences and interpret
them appropriately as WordLeft / WordRight / Home / End.

Signed-off-by: Mike Scalora <mike@scalora.org>
Signed-off-by: Thomas Rosenau <thomasr@fantasymail.de>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-04-05 21:00:54 +02:00
Benno Schulenberg d92eb4fee3 all: eradicate SVN's $Id$ tags 2016-04-05 14:59:12 +02:00
Benno Schulenberg 29cac04afc Renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5778 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-30 12:18:22 +00:00
Benno Schulenberg c98afde096 Renaming 'do_replace_highlight()' to 'spotlight()', for clarity,
for aptness, for contrast.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-30 12:09:39 +00:00
Benno Schulenberg f45a2938e3 Placing the cursor in the edit window again also after a Justify, after an
invalid escape sequence, and when entering a verbatim keystroke.
But leaving the cursor off during Unicode input, for extra feedback.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5771 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-29 14:09:17 +00:00
Benno Schulenberg 5fe838b072 Deleting a no-op.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-28 19:30:27 +00:00
Benno Schulenberg 38b74e6993 Not bothering to put back the cursor in the edit window, as it is off
anyway, and it will be placed back when it's needed: in the main loop.

This prevents a segfault laid bare by r5763: when trying, at startup,
to open a directory, there really is no open buffer yet.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-28 18:53:49 +00:00
Benno Schulenberg 7f3dc2de46 Eliding an unneeded 'if' and unneeded variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 20:21:36 +00:00
Benno Schulenberg 344fe558b6 Tidying up and renaming a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5764 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 20:04:33 +00:00
Benno Schulenberg 6fc70cc474 Removing a pointless condition, and making use of an existing intermediary
variable for a little optimization.

Openfile can never be NULL -- it should have been called openbuffer, and
before we start fiddling with the cursor, we will always have an open buffer.
Edittop might be NULL, but that's okay.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 19:48:44 +00:00
Benno Schulenberg 8fea3472a9 Giving a central variable a ringing name --
tmp* is something for 5 lines, not for 300.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 20:13:16 +00:00
Benno Schulenberg f5eb316603 Rewrapping and reshuffling some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 12:37:10 +00:00
Benno Schulenberg e085ebb872 Making the cursor visible again after a justification and after an
unrecognized escape sequence.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 17:15:28 +00:00
Benno Schulenberg 9d8c72951f The amount to scroll is never zero, so there is no need to check.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 09:55:59 +00:00
Benno Schulenberg 56cfab3df6 Fixing Savannah bug #47127 the proper way,
eliding two silly calls of edit_redraw().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 16:31:02 +00:00
Benno Schulenberg 568d2a389c Switching the cursor on and off at the appropriate moments (that is: when
needed), so that it no longer shows in the help screen nor in the file list.
This fixes Savannah bug #47126.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 19:41:12 +00:00
Benno Schulenberg b8e0e22d64 Switching the cursor on in the right place: in the central input routine.
This makes the cursor visible again during linting.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 20:16:50 +00:00
Benno Schulenberg 97dcd377e7 Turning the cursor off when writing in the status bar,
and ensuring it is on when waiting for input.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:18:27 +00:00
Benno Schulenberg cc2d37053c Updating the screen immediately when a message is posted on the status bar.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:05:58 +00:00
Benno Schulenberg 65c7c810bc Adjusting some indentation and some line wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 09:16:09 +00:00
Benno Schulenberg b8d32d8b7b Condensing the code by removing a triplication.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 15:32:13 +00:00
Benno Schulenberg 38acacb461 Moving set_modified() to the file that has to do with files.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5566 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 14:42:07 +00:00
Benno Schulenberg dfeb0f938f Plugging another memory leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 13:27:12 +00:00
Benno Schulenberg 8a9f71639f Eliding an unneeded variable and adjusting some wrappings and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:41:45 +00:00
Benno Schulenberg 8f463778d1 Deleting an 'if' that is always FALSE.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:27:22 +00:00
Benno Schulenberg 1b293ff34c Adjusting dates and version number.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-10 16:18:43 +00:00
Benno Schulenberg ec4ee1c489 Not going beyond the number of available rows in the edit window.
This fixes Savannah bug #42188.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-09 20:21:29 +00:00
Benno Schulenberg ebbb5b5d1e Making sure to keep advancing also when regex matches are zero-length.
This fixes Savannah bug #26977 -- a hang on start="^" end="$".


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5538 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-09 18:41:56 +00:00
Benno Schulenberg c916ca87bf Correctly restoring the settings of NO_HELP and MORE_SPACE.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-02 16:33:03 +00:00
Benno Schulenberg bd91785d73 Using 'return' instead of an intermediate variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5504 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-22 20:24:50 +00:00
Benno Schulenberg 46082bd00c Renaming three keyboard functions -- 'get' is not a good name when the
routine isn't getting something from somewhere but just converting it.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-22 19:00:25 +00:00
Benno Schulenberg 5d27910d6d Quitting the loop when there is no end match.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5488 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-07 15:40:07 +00:00
Benno Schulenberg bb31118fcb Avoiding two compilation warnings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5481 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-05 11:38:26 +00:00
Benno Schulenberg f2da466388 Rewrapping some lines and tweaking some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-04 21:11:10 +00:00
Benno Schulenberg 07e806e7f2 Unindenting the part that was the 'else'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5463 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-01 13:33:45 +00:00
Benno Schulenberg eee07d5755 Renaming a label and eliding an 'else'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5462 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-01 12:49:17 +00:00
Benno Schulenberg 3d6378b153 Moving a check to a better place.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5461 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-01 12:35:48 +00:00
Benno Schulenberg 0129299dc9 Eliding a variable, and tweaking some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5454 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-29 14:15:16 +00:00
Benno Schulenberg 98f2f852dd Deleting two redundant conditions, and moving the least frequent case
to the end.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-29 13:52:48 +00:00
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
Chris Allegretta cfa297622b 2014-05-27 Chris Allegretta <chrisa@asty.org>
* src/winio.c (edit_refresh): wredrawln() is not supported under
          slang.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4918 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-28 01:35:51 +00:00
Benno Schulenberg 0606c62542 Adjusting a translator comment.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-27 22:03:04 +00:00
Benno Schulenberg 0ae38b4ef8 Telling ncurses to really redraw the line, without optimization.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4907 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-23 20:24:31 +00:00
Benno Schulenberg eb5c49d5bc Painting the current line *after* tickling the terminal, so that
the character in the final column will be displayed properly.
Bug was introduced five days ago.  Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4905 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-19 20:44:24 +00:00
Benno Schulenberg 3be5f461f7 Not skipping the colour-off commands at the end of the colouring loop.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4902 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-17 20:25:42 +00:00
Benno Schulenberg 52e3533e99 Removing a few more doubled-up spaces.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 11:03:04 +00:00
Benno Schulenberg 275bd28d3e Tweaking some whitespace, using TRUE and FALSE instead of 1 and 0,
and mentioning the name of the terminal-tickling character (NBSP).
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 10:34:05 +00:00
Benno Schulenberg dfc9a7edd8 Startling the terminal into handling wide, two-column characters properly.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-14 08:42:14 +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 e7d6e55332 Making it possible for interface-foreground colours to be bright.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-10 19:15:04 +00:00
Benno Schulenberg 59cd3e682b Counting only shortcuts that are actually shown, so that clicking
on the ones after ^T (Speller/Linter) will work again correctly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4848 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-09 11:44:17 +00:00
Benno Schulenberg c970035001 Renaming a variable, and removing an unneeded call of wattroff().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-04 08:53:06 +00:00
Benno Schulenberg 0c3ced0d00 Eliding a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4833 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-04 08:25:09 +00:00
Benno Schulenberg 1663994e42 Adding the ability to colour four elements of nano's interface differently.
Idea and original patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-03 18:24:45 +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 25e5896219 Removeing several unneeded double semicolons plus two relic comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-23 19:33:03 +00:00
Benno Schulenberg 27a52a8def Avoiding three compiler warnings with --enable-debug.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4794 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-21 13:07:18 +00:00
Benno Schulenberg 0d84301da3 Finding properly also the zeroeth item from a
certain menu in the list of functions.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-16 08:24:32 +00:00
Benno Schulenberg f876ee10c5 Relocating and correcting a few comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4774 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-15 11:25:29 +00:00
Benno Schulenberg 1e3f6bc00b Eliding a variable and condensing a comment.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4770 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 10:03:32 +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 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 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