Commit Graph

10666 Commits

Author SHA1 Message Date
G. Branden Robinson
95bcb90691 docs: swap the left and middle footer of the man pages
Also, say "GNU nano" instead of "version".

Having the name of the software on the left and the date in the middle
aligns better with preponderant practice.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-30 12:12:41 +02:00
Benno Schulenberg
0edc6610dd docs: use curly double quotes when scare quotes are meant
Inspired-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-04-29 12:56:17 +02:00
Benno Schulenberg
fc84a19883 docs: replace the e.g. and i.e. abbreviations with plain English words
Inspired-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-04-29 12:56:17 +02:00
G. Branden Robinson
35e11ce7ff docs: consistently use minus sign for M- notation
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-29 12:56:17 +02:00
G. Branden Robinson
269b96b703 docs: set "foreign" software in italics, not bold
As libmagic, ncurses, and terminfo are software components that
aren't topics of nano's own man pages, use italics for them.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-29 12:55:55 +02:00
Benno Schulenberg
286aefa34a docs: reword a description to make it clearer what typeface applies
Also, make the typeface usage in the texi version more consistent.

Inspired-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-04-28 17:33:08 +02:00
G. Branden Robinson
5660833ce8 docs: consistently set file names in italics
Also protect them from hyphenation (by prepending \%)
and add hyphenless break points (\:) to lengthy file names.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-27 17:21:51 +02:00
G. Branden Robinson
8499183c02 docs: favor the \[ti] special character over a literal ~
Some output devices render a plain ASCII tilde as U+02DC (small tilde).

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-27 16:28:17 +02:00
G. Branden Robinson
2e59a695e7 docs: style function names with bold, not backticks
Using bold is more consistent with the rest of nano's man pages.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-27 13:15:04 +02:00
G. Branden Robinson
6fe93a6c3f docs: fix three unescaped hyphens before option names
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-27 13:15:04 +02:00
Benno Schulenberg
09db112412 syntax: man: colorize also the \[xx] special-character syntax 2026-04-27 13:15:04 +02:00
G. Branden Robinson
2de91de36b docs: use groff-style special-character syntax: \[xx] instead of \(xx
The \(xx style looks ugly with its unbalanced left parenthesis,
and \[bu], \[Fc], and \[md] are already being used.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-27 13:14:47 +02:00
Benno Schulenberg
f43240e9b0 docs: prevent some keywords and compound keywords from getting hyphenated
Inspired-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-04-26 12:33:18 +02:00
G. Branden Robinson
ac1bf7d60e docs: sync rnano's synopsis markup with nano's
The plus and the comma are literals, so should be in bold.

(See commit a06b921f1 from seven years ago.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-26 11:21:22 +02:00
Benno Schulenberg
b11349d901 build: fix compilation when configured with --enable-tiny
(This should have been part of commit 22e2ea3c from last week.)
2026-04-25 09:09:28 +02:00
Benno Schulenberg
2838b2429e docs: more precisely describe what --restricted forbids and allows 2026-04-23 12:11:41 +02:00
Benno Schulenberg
97d72f4821 docs: remove all mention of the old Mac file format 2026-04-18 15:57:06 +02:00
Benno Schulenberg
5bb19b0598 help: reshuffle the Backup toggle, to keep Append and Prepend paired 2026-04-18 15:56:27 +02:00
Benno Schulenberg
22e2ea3cf4 tweaks: fold two fragments of code together 2026-04-18 15:48:22 +02:00
Benno Schulenberg
cad7948400 tweaks: normalize the indentation after the previous change 2026-04-18 15:48:22 +02:00
Benno Schulenberg
bf342bcb3c files: remove the code for reading and writing old Mac files
Twenty five years after the Mac switched from Carriage Return (CR)
to Line Feed (LF) as the line ending, it is time to ditch the code
for reading and writing the old format.
2026-04-18 15:48:08 +02:00
Benno Schulenberg
d75b7a3072 syntax: default: colorize the release motto for the 9.* series too 2026-04-12 14:04:04 +02:00
Benno Schulenberg
c7276e58c9 po: update translations and regenerate POT file and PO files 2026-04-08 17:09:21 +02:00
Benno Schulenberg
b7c9882428 bump version numbers and add a news item for the 9.0 release 2026-04-08 16:52:40 +02:00
Benno Schulenberg
cb43493e00 history: create the ~/.local directory with limited access rights
Permitting everyone to write to the .local directory gave attackers
(on platforms where umask is 000) a tiny opportunity to become the
owner of the .local/share subdirectory, which would allow them to
install malicious .desktop files.

This fixes https://bugzilla.redhat.com/2455314.
Reported-by: Michał Majchrowicz <mmajchrowicz@afine.com>
Patch-by: Michał Majchrowicz <mmajchrowicz@afine.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>

Bug existed since version 2.9.1, commit 4200ed30,
from shortly after support for XDG was added.
2026-04-06 11:23:42 +02:00
Benno Schulenberg
7cf0125e9c docs: trim stuff that is more than four years old from the changelog 2026-04-04 12:17:03 +02:00
Benno Schulenberg
3b22c1cce8 copyright: update the years for significantly changed files 2026-04-04 09:23:31 +02:00
Benno Schulenberg
c1ea0601c9 tweaks: defend against hypothetical format specifiers
With this change, any format specifiers that the now third parameter
of statusline() *might* contain will not lead to unintended accesses
of memory.

Suggested-by: Jonathan Echavarria <jrec93@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-02 11:18:24 +02:00
Benno Schulenberg
0b7328bce4 feedback: prevent interpretation of %s and similar in a filename
When a filename contains things that look like format specifiers
(%s, %p, %n, ...) and opening this file throws some error and this
file is opened together with others, then switching to the relevant
buffer would cause the %x parts to be interpreted as actual format
specifiers, resulting in the leakage of information, or in a crash,
or possibly in arbitrary memory writes.

Reported-by: Jonathan Echavarria <jrec93@gmail.com>
Patch-by: Jonathan Echavarria <jrec93@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-04-01 12:23:50 +02:00
Benno Schulenberg
0e430310b8 docs: add ^B among the list of keystrokes for --modernbindings
Even though ^B is the default binding for a backward search, the
default for a forward search (^F) is mentioned too, so...
2026-04-01 12:05:06 +02:00
Benno Schulenberg
dbfce437af moving: make the minimum step for sideways scrolling two cells
Otherwise, with a tabsize of 1, rightward scrolling would get "stuck"
on a double-width character.
2026-04-01 08:02:52 +02:00
Benno Schulenberg
a01bc5f117 docs: adjust the description of scrollright for the improved behavior
And make the description more concise.
2026-04-01 08:00:08 +02:00
Benno Schulenberg
adff8171cc moving: when scrolling sideways, search also upward for a longer line
Otherwise, when the cursor is near the bottom of the viewport, and there
are overlong lines visible *above* the cursor, it is frustrating that
nano refuses to scroll sideways further than the bottom lines allow.

(Trying to move the cursor up has to happen before trying to move it
down, otherwise nano can get "stuck" on a long line that is present
just below the viewport.)
2026-03-31 16:57:19 +02:00
Benno Schulenberg
f16e8d8888 build: add move.c to the list of files that contain translatable strings 2026-03-29 12:06:06 +02:00
Benno Schulenberg
e637fdb42c gnulib: update to its current upstream state 2026-03-29 11:36:15 +02:00
Benno Schulenberg
0b17713756 moving: ignore scrollleft and scrollright with --solosidescroll too
And give feedback when those functions are called while --softwrap or
--solosidescroll are in effect.
2026-03-26 12:21:22 +01:00
Benno Schulenberg
5d31b0f595 docs: in the cheatsheet, place Ctrl+L in the Special movement section
More than redrawing the entire screen, its most obvious effect is
centering the current line, which is a movement of the viewport.

(Also, improve the wording for Alt+G.)
2026-03-23 16:32:42 +01:00
Benno Schulenberg
a3cb12ccff syntax: elisp: remove file -- something specific to Emacs is not for nano
(Nano doesn't have a syntax for vimscript either.)

The file has been moved to:

  https://nano-editor.org/more-syntaxes/elisp.nanorc
2026-03-22 07:56:07 +01:00
Benno Schulenberg
84f7eb2d1e tweaks: rename two variables, away from abbreviations 2026-03-21 13:21:54 +01:00
Benno Schulenberg
9e2f8e0fb3 tweaks: rename a variable, for contrast, and to be more fitting
The name `list` better indicates that a "history" is a list of things
(that were typed at a prompt in the past).
2026-03-21 12:46:05 +01:00
Benno Schulenberg
8abdd80f24 tweaks: rename three functions, to be more accurate 2026-03-21 12:38:10 +01:00
Benno Schulenberg
3dc49fa6b8 tweaks: rename a variable, to be more fitting and away from an abbrev 2026-03-20 12:30:29 +01:00
Benno Schulenberg
d3019a1c40 tweaks: rename a variable, away from a double abbreviation 2026-03-20 12:15:53 +01:00
Benno Schulenberg
63594a3f92 tweaks: rename a variable, to be more fitting
The list of filenames-plus-their-last-cursor-position contains just one
cursor position per file, not a record of the last two hundred cursor
positions per file.  So the name `register` is much more fitting than
the name `history`.

Also, correct a comment.
2026-03-20 12:04:21 +01:00
Benno Schulenberg
3e104064db tweaks: rename a type, away from a double abbreviation 2026-03-20 11:48:26 +01:00
Benno Schulenberg
c05a9009be docs: adjust the description of scrollright for the changed behavior
The previous commit restricted the line-jumping behavior of the cursor
to just the lines in the current viewport, thus keeping the viewport in
the (linewise) same position in the buffer.
2026-03-17 17:44:06 +01:00
Benno Schulenberg
902378fd7d moving: stay in the viewport when stepping to a longer line
When the current line is not long enough to allow the viewport to be
scrolled another tabsize to the right, then look for a longer line
only within the current viewport (and after the current line) --
because changing the vertical position of the viewport when doing an
essentially horizontal movement was not a good idea.
2026-03-16 08:36:17 +01:00
Benno Schulenberg
3ac3b27259 help: group the sideways scrolling keystrokes with the horizontal movers
This better fits the original grouping of increasing vertical strides.
2026-03-15 13:41:57 +01:00
Benno Schulenberg
a334b64e89 display: correct the previous commit -- the -1 is needed when going left
Otherwise the step is tabsize-1, and one doesn't reach column 1 again.
2026-03-15 12:25:17 +01:00
Benno Schulenberg
f6e9b78b73 display: put cursor at CUSHION columns from edge when scrolling sideways
Put it at CUSHION columns, not at CUSHION+1 columns, when scrolling to
the right and the cursor would otherwise be outside this inner frame.

(The -1 and +1 came from attempts to make it work before I decided to
make it scroll a tabsize number of columns.)
2026-03-15 12:09:07 +01:00