David Lawrence Ramsey
059c8efb44
input: make Shift+Alt+Arrow work properly on rxvt and Eterm terminals
...
This fixes https://savannah.gnu.org/bugs/?49636 .
2016-11-26 11:57:39 +01:00
Mike Frysinger
eb68cd1c6b
syntax: avoid using black colors
...
We should avoid defining color schemes that are unreadable on common
white-on-black or black-on-white terminals. Change the black in the
autoconf error strings to brightred for that reason.
2016-11-23 21:08:59 +01:00
Mike Frysinger
ecea413802
configure: fix ncurses lib symbol checking
...
When probing symbols provided by ncurses, use the sublibs that pkg-config
reported in case they're needed (like when libtinfo is a sep library).
URL: https://savannah.gnu.org/bugs/?49614
2016-11-23 14:26:03 -05:00
Benno Schulenberg
95253231e8
docs: mention that libncursesw5-dev is needed for building from git
...
In addition, tweak some of the wording.
2016-11-20 18:04:21 +01:00
Benno Schulenberg
eb5968f845
startup: activate restricted mode earlier, so --help will reflect it
...
Kind-of-discovered-by: Markus Bergholz <markuman@gmail.com>
2016-11-17 18:05:09 +01:00
Benno Schulenberg
f2c72bf759
binding: always initialize some keycode variables to a standard value
...
Also when somehow key_defined() is missing.
This fixes https://savannah.gnu.org/bugs/?49614 .
Reported-by: Mike Frysinger <vapier@gentoo.org>
2016-11-17 17:32:28 +01:00
Mike Frysinger
e472b72565
syntax: gentoo: various updates
...
- make version highlight less blindly greedy and conform to real versions
- move version matching before USE matching to avoid hitting USE flags
that look like versions
- change USE regex to match the Gentoo PMS
- extend arch match to include more keywords
- make category matching more restrictive to avoid false positives
- drop operators =< and => that Gentoo doesn't support
URL: https://savannah.gnu.org/bugs/?49569
Reported-by: Konstantin Shakhnov <kastian@mail.ru>
2016-11-14 13:44:53 -05:00
Benno Schulenberg
e332d2df74
docs: harmonize the indentation of the README, and tweak some wordings
2016-11-13 20:35:19 +01:00
Benno Schulenberg
ed165827bc
screen: don't hide the cursor when --constantshow is used
...
(Bug was introduced yesterday, by commit a4132e2.)
2016-11-13 20:00:31 +01:00
Benno Schulenberg
65bf36baa5
rcfile: let a 'set fill' reenable hardwrapping
...
Otherwise the user can override a 'set nowrap' in /etc/nanorc only
via the command line.
This fixes https://savannah.gnu.org/bugs/?49593 reported by Shirish.
2016-11-13 19:47:15 +01:00
Benno Schulenberg
7598b77e75
screen: use the correct width to determine whether a softwrap occurred
...
This fixes the two bugs reported by Anton Minaev
in https://savannah.gnu.org/bugs/?49511 .
2016-11-13 19:20:38 +01:00
Benno Schulenberg
a4132e2e64
screen: do a refresh before changing the value of 'focusing'
...
This fixes https://savannah.gnu.org/bugs/?49530 .
2016-11-12 18:02:03 +01:00
Benno Schulenberg
8a66c820ab
syntax: don't leave the number after 'fill' and 'tabsize' in red
...
Also, don't use ignore-case for things that don't contain letters.
2016-11-12 13:00:09 +01:00
Benno Schulenberg
af0f81f71d
docs: mention that a foreground color can be bright
...
Also replace some backslashed spaces because they hinder the
justification of the man page.
2016-10-30 10:03:06 +01:00
Benno Schulenberg
ea1afac9db
po: update translations and regenerate POT file and PO files
2016-10-29 11:53:44 +02:00
Benno Schulenberg
04aab233d0
bump version numbers and add a news item for 2.7.1
2016-10-29 11:11:33 +02:00
Benno Schulenberg
33bc848c5b
binding: properly conditionalize the UTF-8 parts
...
Reported-by: Sumedh Pendurkar <sumedh.pendurkar@gmail.com>
2016-10-29 10:19:28 +02:00
Benno Schulenberg
4c476bc872
scrolling: use a comparison that will work also in softwrap mode
...
This fixes https://savannah.gnu.org/bugs/?49467 .
2016-10-28 11:38:58 +02:00
Benno Schulenberg
9c2e270b3e
softwrap: initialize 'editwincols' early, for computing the number of wraps
...
When giving a line number on the command line, do_gotolinecolumn() needs
to know the width of the screen to be able to (roughly) place the target
line in the center of the screen.
This fixes https://savannah.gnu.org/bugs/?49462 .
2016-10-28 10:50:06 +02:00
Benno Schulenberg
0eef5610eb
files: mark a new buffer as modified after inserting command output
...
This fixes https://savannah.gnu.org/bugs/?49423 .
2016-10-27 20:05:05 +02:00
Benno Schulenberg
2a55d2b29a
tweaks: adjust some comments and reduce the scope of some variables
...
Also remove some cluttering conditional compilation.
2016-10-27 20:04:50 +02:00
Benno Schulenberg
5416b9c09d
tweaks: remove a band-aid condition that is no longer needed
...
Also, don't bother conditionalizing two booleans for the tiny version.
2016-10-27 20:00:01 +02:00
Benno Schulenberg
7287300e0d
tweaks: compile two parameters unconditionally
2016-10-27 12:24:41 +02:00
Benno Schulenberg
ffeb0f9d4b
tweaks: don't spread a statement over multiple lines unnecessarily
2016-10-27 11:41:49 +02:00
Benno Schulenberg
10c9093942
general: add the option -g/--showcursor, to match Pico
...
The nanorc option already exists, but not the corresponding one
for the command line.
2016-10-27 11:34:41 +02:00
Benno Schulenberg
b38cbfe173
startup: always initialize 'margin' and 'editwincols'
...
This fixes https://savannah.gnu.org/bugs/?49428 .
2016-10-24 17:40:06 +02:00
Benno Schulenberg
702b09c859
tweaks: elide a parameter that is always FALSE
2016-10-23 20:07:39 +02:00
Benno Schulenberg
2cd8ca4eb1
tweaks: stop compiling the whole_word_only parameter conditionally
...
This make tiny nano slightly less tiny, but makes the code more readable.
2016-10-23 20:07:30 +02:00
Benno Schulenberg
55b1403542
tweaks: adjust some whitespace and a comment
2016-10-23 17:26:19 +02:00
Benno Schulenberg
9d5ee16614
tweaks: don't bother redrawing some lines when whole screen will be redrawn
2016-10-23 17:26:19 +02:00
Benno Schulenberg
01bbf7e82f
tweaks: rename a function to better describe what it does
...
It does not update anything -- it just picks a new point from
where to start displaying the buffer. All actual updating of
the screen is done by edit_refresh() and edit_redraw() and such.
2016-10-23 17:26:19 +02:00
Benno Schulenberg
3ed5ddba31
docs: remove a reference that was only valid on Debian systems
2016-10-23 17:22:30 +02:00
Benno Schulenberg
6cacd1e320
tweaks: make several small adjustments to the documentation
2016-10-23 12:29:21 +02:00
Benno Schulenberg
d9cae81a0e
docs: mention the existence of the toggles in the man page
2016-10-22 17:27:15 +02:00
Benno Schulenberg
83ee1feda4
docs: add 'set linenumbers' and '--linenumbers' to the texinfo document
...
Also mention the corresponding toggle (M-#).
2016-10-22 17:06:50 +02:00
Benno Schulenberg
c7610ba356
docs: add 'linenumbers' and 'numbercolor' to the sample nanorc
2016-10-22 13:49:13 +02:00
Benno Schulenberg
ae648778e2
screen: refresh when a new magicline is added in line-numbering mode
...
This fixes https://savannah.gnu.org/bugs/?49406 .
2016-10-21 15:59:16 +02:00
Benno Schulenberg
023edffe3d
screen: move the margin determination to the main loop
...
There is no need to look at this for every painted line, because
the margin can only change when some key is struck.
2016-10-21 14:56:56 +02:00
Benno Schulenberg
2789bb0813
screen: repaint the edit window in a single place -- the main loop
...
Instead of doing this in two places: after interpreting shortcuts,
and after injecting characters.
2016-10-21 14:56:53 +02:00
Benno Schulenberg
4d996e4c39
screen: suppress line numbers when the terminal is very narrow
...
To prevent the display from getting messed up, making nano unusable.
2016-10-21 14:55:43 +02:00
Benno Schulenberg
de2aa4f24a
rcfile: add an option to customize the color of line numbers
2016-10-20 16:48:45 +02:00
Faissal Bensefia
de95ca68f7
new feature: the ability to show line numbers before the text
...
It can be activated with --linenumbers on the command line or with
'set linenumbers' in a nanorc file, and it can be toggled with M-#.
Signed-off-by: Faissal Bensefia <faissaloo@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-10-20 16:47:52 +02:00
Benno Schulenberg
55878efe5d
binding: supply the keycode for most special keys directly
...
Instead of figuring them out from the string. This is possible
because those dedicated editing keys cannot be rebound anyway.
2016-10-18 20:38:27 +02:00
Benno Schulenberg
43f35fc7a9
softwrap: ensure the current line is fully visible when moving in it
...
This fixes https://savannah.gnu.org/bugs/?49099 ,
and fixes the unreported corresponding bugs for
<End> and <Del> and typing extra characters.
2016-10-18 15:07:47 +02:00
Benno Schulenberg
d66ea08473
moving: adjust the Y position to correspond with the changed X position
...
So the softwrap code in do_down() can compute the correct amount to scroll.
This fixes https://savannah.gnu.org/bugs/?49374 .
2016-10-18 11:46:15 +02:00
Benno Schulenberg
8476bf86a1
tweaks: fix compilation when configured with --enable-tiny
2016-10-15 18:05:01 +02:00
Benno Schulenberg
c92982d60f
binding: fix some duplicated carets and too restrictive menus
2016-10-15 17:18:51 +02:00
Benno Schulenberg
7a274d621a
binding: use arrows instead of words to designate the cursor keys
2016-10-15 17:04:01 +02:00
Benno Schulenberg
fdee0df849
input: keep the Ctrl+Arrow keys working when their synonyms are unbound
...
This fixes https://savannah.gnu.org/bugs/?49058 reported by Rishabh Dave.
2016-10-15 17:03:10 +02:00
Benno Schulenberg
00efa50385
build: avoid updated PO files being remerged upon every make
2016-10-15 15:09:34 +02:00