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>
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>
Also protect them from hyphenation (by prepending \%)
and add hyphenless break points (\:) to lengthy file names.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
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>
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>
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.
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.
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>
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>
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.)
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.)
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.
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.
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.
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.)