Commit Graph

10597 Commits

Author SHA1 Message Date
Benno Schulenberg
dd50adb61b docs: reshuffle the --solosidescroll option to match the order in --help 2026-03-01 09:30:28 +01:00
Benno Schulenberg
4694c95524 build: exclude whole-window sideways scrolling from the tiny version
Let the tiny version scroll sideways only the current line, always.
(It then does not need the --solosidescroll option either.)
2026-03-01 09:30:28 +01:00
Benno Schulenberg
49be1275e6 syntax: guile: colorize more syntax words and procedure names
Also, colorize more quoted symbols and booleans, make the green for
syntax words and the blue for keywords lighter, and show comments
in grey italics.  Also, don't miscolorize some empty strings as if
they were the start of a multiline string.

This addresses most of https://savannah.gnu.org/patch/?10558.
2026-02-21 16:41:33 +01:00
Benno Schulenberg
8d49be96d6 syntaxes: add a license line to the files created by Mark Oteiza
He agreed to this by private email.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-02-19 17:22:18 +01:00
Benno Schulenberg
5df0b2e41a tweaks: no need to be overpolite when giving directions
(When requesting bug reports, then it's okay to say "please".)
2026-02-18 16:17:03 +01:00
Benno Schulenberg
07f84b7b61 tweaks: replace the three instances of impersonal "one" with direct "you"
This better matches the style in the rest of the manual.
2026-02-18 16:17:03 +01:00
Benno Schulenberg
083d6c70ee tweaks: lowercase subsequent words in section titles, to be less pompous 2026-02-18 16:17:03 +01:00
Benno Schulenberg
83ef26dc74 input: prevent also a string bind from breaking a chain of cuts or copies
The content of a string bind will probably break that chain, but the
keystroke itself (to which the string is bound) should not break it.
2026-02-18 16:10:05 +01:00
Benno Schulenberg
f1db15c7b6 input: prevent most toggles from breaking a series of cuts or copies
Only the cut-from-cursor toggle should break a chain of cuts or copies,
because it affects how those operations behave.  All other toggles have
no effect on those operations nor on the position of the cursor, so they
should not break a chain of cutting or copying keystrokes.

Achieve this by reshuffling a fragment of code to before the fragment
that triggers cutbuffer clearing for most operations.

(This has as interesting side effect that none of the toggles breaks a
chain of completions either.)

This fixes https://savannah.gnu.org/bugs/?68050.

Bug existed since version 4.3, commit 6c4f228f.
2026-02-18 16:10:05 +01:00
Benno Schulenberg
93ae8259c8 input: allow recordmacro and runmacro to continue cuts and copies
Starting the recording or replaying of a macro does not change anything
about the position of the cursor or the state of the buffer, so those
functions should not interrupt a series of cuts (^K) or copies (M-6).

This allows a macro to complete a series of cuts or copies that were
initiated manually (or by a previous macro).

This addresses https://savannah.gnu.org/bugs/?68046.
2026-02-15 12:32:05 +01:00
Benno Schulenberg
8771acb98a tweaks: slightly adjust a wording 2026-02-15 12:21:36 +01:00
Benno Schulenberg
a29c225b7a docs: add a section about the recording and replaying of keyboard macros
Also, move the text of the section about Limitations into this new
section, as the only documented limitation concerns macros.
2026-02-15 12:17:27 +01:00
Benno Schulenberg
db9ada1bf8 tweaks: move a function to a more logical place
Adding stuff to the macro buffer happens after recording has started
and before the macro is run.
2026-02-15 09:58:37 +01:00
Benno Schulenberg
1d3a8bc24e tweaks: reduce the scope of two variables 2026-02-15 09:50:50 +01:00
Charles Mirabile
00bfeb2dcf macro: cancel the recording if nothing was entered between start and stop
When the user stops a macro recording immediately after starting it,
cancel the recording and restore the macro that existed previously,
instead of storing a new empty macro.

This avoids overwriting an existing macro when the user realizes at
once that they've hit `recordmacro` instead of `runmacro`.

Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2026-02-15 09:34:44 +01:00
Benno Schulenberg
617c559628 syntax: python: require a blank after the keyword match
This avoids colorizing "match" in calls of re.match().

Reported-by: Stanislaw Majewski <essdoem@yahoo.com>
2026-02-11 16:50:10 +01:00
Benno Schulenberg
6b547f3afe tweaks: normalize brace placement after the previous change 2026-02-11 16:45:43 +01:00
Benno Schulenberg
a8dca7c918 display: let option --jumpyscrolling affect also sideways scrolling
When using --jumpy, the viewport scrolls vertically in steps of
half a screen (height).  Then it makes sense that the viewport
also scrolls horizontally in steps of half a screen (width).
2026-02-11 14:41:34 +01:00
Benno Schulenberg
965531485f tweaks: reorder a list of keys, starting with singles, ending with group 2026-02-11 14:37:25 +01:00
Benno Schulenberg
9419bc38de tweaks: condense the Python coloring rules, and reword a comment 2026-02-07 09:09:41 +01:00
Benno Schulenberg
1b7e24dc30 docs: copy the 8.7.1 news item from the release branch 2026-02-07 08:22:23 +01:00
Benno Schulenberg
bf194dae5d syntax: python: colorize also the match and case keywords
These keywords were introduced in Python-3.10:
  https://docs.python.org/3/whatsnew/3.10.html#pep-634-structural-pattern-matching

Reported-by: Stanislaw Majewski <essdoem@yahoo.com>
2026-02-03 16:37:37 +01:00
Benno Schulenberg
46a015c624 docs: add a notice about the changed sideways scrolling behavior
And mention how to get the old behavior back.
2026-01-31 15:49:03 +01:00
Benno Schulenberg
20c554c9b3 docs: add an Exit Status section to the man page and the manual
And correct and improve the description of the `discardbuffer`
bindable function.

This addresses https://savannah.gnu.org/bugs/?67979.
Reported-by: Tasos Papastylianou <tpapastylianou@hotmail.com>
2026-01-31 11:44:24 +01:00
Benno Schulenberg
c5902343bd display: store brink per buffer, to keep the viewport stable
This fixes https://savannah.gnu.org/bugs/?67993.

Bug existed since whole-window sideways scrolling was introduced
in commit 7779a199 from last week.
2026-01-31 08:49:10 +01:00
Benno Schulenberg
aca7face38 build: avoid three warnings when compiling against glibc-2.43
Functions like strchr() now return 'const char' instead of just 'char'.

This addresses the second part of https://savannah.gnu.org/bugs/?67954.
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
2026-01-30 08:58:20 +01:00
Benno Schulenberg
5131dca77f gnulib: update to a recent version, to allow compiling against glibc-2.43
Parentheses were missing in the declaration of wmemchr().
They were added two months ago in gnulib commit df17f4f37e.

This addresses the first part of https://savannah.gnu.org/bugs/?67954.
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
2026-01-30 08:58:06 +01:00
Benno Schulenberg
2e2a40ea09 docs: document the new --solosidescroll and 'set solosidescroll' options
These re-enable the historical jerky single-line sideways scrolling.
2026-01-23 17:37:03 +01:00
Benno Schulenberg
38f87fb5c3 display: add extra variable, to avoid one-way toggling of SOLO_SIDESCROLL
Panning should not be switched off for the whole session
when the window became too narrow at some point.
2026-01-23 17:37:03 +01:00
Benno Schulenberg
f6297f0933 display: for narrow windows, fall back to single-line sidescrolling
Otherwise the cursor can get misplaced sometimes.
2026-01-23 17:37:03 +01:00
Benno Schulenberg
a7e8dd7d6b options: accept --solosidescroll and 'set solosidescroll'
These options activate the old, jerky, single-line sideways scrolling
instead of the new default smooth whole-window sideways scrolling.
2026-01-23 17:37:03 +01:00
Benno Schulenberg
7779a19903 new default feature: smooth whole-window sideways scrolling
Instead of horizontally scrolling just the current line by nearly
a screen width when the cursor is about to go offscreen, now all
screen lines are scrolled horizontally together by just the amount
needed to keep the cursor comfortably in view.

References:
  https://lists.gnu.org/archive/html/nano-devel/2026-01/msg00000.html
  https://lists.gnu.org/archive/html/nano-devel/2026-01/msg00003.html
  https://lists.gnu.org/archive/html/nano-devel/2014-05/msg00025.html
  https://lists.gnu.org/archive/html/nano-devel/2014-06/msg00152.html

Nano could have acquired this feature nearly twelve years ago, but...
somehow that old patch fell through the cracks and was forgotten.  :|

Motivated-by: Xylia Allegretta <xylia.allegretta@gmail.com>
Original-patch-by: Mark Majeres <mark@engine12.com>
2026-01-23 17:37:03 +01:00
Benno Schulenberg
255845cc13 tweaks: correct a comment 2026-01-23 16:27:10 +01:00
Benno Schulenberg
f7c96dba4a copyright: update the years for the FSF 2026-01-17 12:12:55 +01:00
Benno Schulenberg
299aab6acf tweaks: refer to two renamed gnulib modules with their adjusted names 2025-12-06 12:11:05 +01:00
Benno Schulenberg
3295ca6bd8 copyright: update the years for significantly changed files 2025-11-27 11:27:31 +01:00
Benno Schulenberg
632542462a tweaks: rename two functions, reword some comments, rewrap a line 2025-11-24 15:23:02 +01:00
Benno Schulenberg
bd72b21c18 mouse: allow clicking before the answer to place cursor at its beginning
In the prompt bar, clicking beyond the end of the answer places the
cursor at the end of the answer.  Then it makes sense that clicking
before the beginning of the answer places the cursor at its beginning.
2025-11-24 13:07:30 +01:00
Benno Schulenberg
31fc5194b2 new feature: clicking in the scrollbar jumps to the corresponding line
With --mouse and --indicator, clicking in the rightmost column of
the edit window (the "scrollbar" area) now makes the cursor jump
to the line that places the indicator at the clicked position.

Inspired-by: Firefox, and originally by tilde and fte.
2025-11-24 11:21:08 +01:00
Benno Schulenberg
fc1d88a00f tweaks: avoid having to restore the original click coordinates
When going to handle clicks on shortcuts, the help lines are present,
so we know exactly where the prompt is (third line from the bottom),
so there is no need to first convert the coordinates to be relative
to the bottom window and then restore them when `mouse_y` is zero.
2025-11-24 11:05:23 +01:00
Benno Schulenberg
54e1619d6e tweaks: condense two oververbose comments 2025-11-24 11:05:23 +01:00
Benno Schulenberg
b4246d2cac tweaks: remove an unneeded parameter from get_mouseinput()
Only the Yes-No routine handles clicks on shortcuts itself, so just
exclude that menu from the shortcut handling by mouse, instead of
burdening every call with an unclear parameter.
2025-11-24 11:05:23 +01:00
Benno Schulenberg
3539d4862e tweaks: add a comment for an unclear fragment of code 2025-11-22 17:39:57 +01:00
Benno Schulenberg
1457013c53 docs: explain what "overlong" means for --breaklonglines
Inspired-by-a-report-from: Sébastien Desreux <seb@h-k.fr>
2025-11-21 16:45:45 +01:00
Benno Schulenberg
c32fdec09f tweaks: slightly improve three comments in the sample nanorc 2025-11-21 12:05:31 +01:00
Benno Schulenberg
3b983dd889 files: include also the slash when re-adding the filename to the path
Otherwise a mistaken name gets recorded in the file-positions history.

Buglet existed since version 6.1, commit fdd946c0.
2025-11-19 11:48:12 +01:00
Benno Schulenberg
71c60563a2 tweaks: reshuffle or transmute a few lines, to elide an 'if' 2025-11-14 10:17:17 +01:00
Benno Schulenberg
fd531c248e po: update translations and regenerate POT file and PO files 2025-11-12 10:48:25 +01:00
Benno Schulenberg
9735af4d78 bump version numbers and add a news item for the 8.7 release 2025-11-12 08:35:56 +01:00
Benno Schulenberg
88aa9157d1 gnulib: update to its current upstream state 2025-11-11 11:24:21 +01:00