When the mark is on, moving the cursor to the top or bottom row should
highlight the relevant area -- thus requiring a call of edit_refresh()
to be scheduled.
Also, drop two calls of place_the_cursor(), as that is done anyhow in
the main loop, either directly, or indirectly through edit_refresh().
This fixes https://savannah.gnu.org/bugs/?65992.
Reported-by: Tasos Papastylianou <tpapastylianou@hotmail.com>
Bug existed since version 8.0, since Alt+Home/Alt+End were introduced.
Instead of simply overwriting the current contents of the keystroke
buffer with the contents of the macro buffer, insert the latter's
contents at the head of the keystroke buffer.
This allows using {runmacro} in a string bind, and allows typing ahead
over a laggy connection after invoking `runmacro` (normally with M-;).
This fixes https://savannah.gnu.org/bugs/?65991.
Reported-by: Tasos Papastylianou <tpapastylianou@hotmail.com>
Bug exists since version 2.9.4, since string binds were introduced.
When NumLock is off, let Ctrl plus the central key on the numeric keypad
center the current line.
(This binding is not advertised anywhere
-- it's left as a little Easter egg.)
As version 0.20 of `autopoint` no longer overwrites 'extern-inline.m4',
there is no need any more for the custom calls of the various parts of
`autoreconf`.
This effectively reverts commit 4a1db96d from two and a half years ago.
Gettext-0.20 is the first version where its `autopoint` does not
overwrite the newer 'extern-inline.m4' from gnulib.
Version 0.20 is five years old, so most users will be on a distro
that includes that version of gettext or a newer one.
Also, reshuffle Alt+T for balance, slightly reword the description
of Alt+A (as it differs in nature from the other toggles), and add
some spaces for better alignment.
Something similar can be achieved with:
bind ^T "{center}{bottomrow}{center}{toprow}" main
bind ^B "{center}{toprow}{center}{bottomrow}" main
But that requires allocating two extra shortcuts, and it works right only
when the edit window has an odd number of rows, not with an even number.
Also, this new ^L behavior is available by default, out-of-the-box.
On the first call, `cycle` centers the line with the cursor, on the
second consecutive call it pushes that line to the top of the viewport,
and on the third consecutive call to the bottom of the viewport.
The function do_tab() is only ever called when in the main edit window,
and never called while a bracketed paste is in progress.
(The two conditions were thoughtlessly copied when this fragment of code
was moved here three commits ago.)
When softwrapping with a tabsize larger than the width of the viewport,
scrolling one row when the cursor goes offscreen might not be enough,
so in that case use edit_redraw() instead.
This fixes https://savannah.gnu.org/bugs/?65860.
Bug existed since version 2.9.6, commit 0d9080a2.
This allows a {tab} in a string bind to indent a marked region.
This fixes https://savannah.gnu.org/bugs/?65859.
Problem existed since version 7.0, since braced function names
were introduced.
Activating --modernbindings when the binary's name starts with "e"
interferes with Debian's alternatives system that symlinks `editor`
to `nano` in a default install.
(Also: why "e"? It would have made more sense to check for "m",
similar to the checking for "r" for a restricted nano.)
This reverts commit 580eaf29 from fifteen months ago.
This addresses https://savannah.gnu.org/bugs/?65810.
Reported-by: Colin Snover <nano@zetafleet.com>
The names of the authors were retrieved from:
git log -p --follow syntax/<name>.nanorc
and from:
git log -p --follow --all -- doc/nanorc.sample
For some files the original author is unclear, or
the file is/was too small to mention an author for.
The typo prevented several keywords from getting colorized.
This addresses https://savannah.gnu.org/patch/?10459.
Bug existed since version 2.1.6, commit 513157df,
since the Fortran syntax was introduced.
The succinct function descriptions in the help lines are not shown in
reverse video by default, so they are not bolded by -D/--bold either.
Also, mention 'promptcolor' and 'minicolor' where they were missing.
Prevent also the toggling of Append and Prepend. All four functions
should not be available in restricted mode, and are absent from the
WriteOut menu in that mode, but using {browser}, {backup}, {append}
or {prepend} in a string bind allowed to bypass the menu checks.
This fixes https://savannah.gnu.org/bugs/?65819.
Problem existed since version 7.0, since braced function names
were introduced.
Since version 3.2, commit 5ca444e5, nano reads the nanorc files also
in restricted mode (when not also --ignorercfiles is given), meaning
that syntaxes are available and that a specific syntax can be selected
on the command line. So, the --help output in restricted mode should
list the relevant option: -Y<name> / --syntax=<name>.
(This should have been part of commit b81995af from six years ago.)
The bindable function 'nowrap' has been deprecated for three years,
since version 5.5, commit e14127b8.
(The obsolete options --nowrap and 'set nowrap' continue to exist.)