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.
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.
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.
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.
This refixes https://savannah.gnu.org/bugs/?56033.
This became needed after the previous commit removed the regeneration
of the screen from the blocking/unblocking of SIGWINCHes.
Otherwise a SIGWINCH could occur between finalizing the reading of the
specified files and becoming ready for user input, which would result
in the first keystroke getting transformed into the THE_WINDOW_RESIZED
meta symbol, and thus effectively being discarded.
This fixes the third part of https://savannah.gnu.org/bugs/?67635.
The issue was reported by `twofiftysix`.
Buglet has existed for a long time.
Otherwise nano is deaf for SIGWINCHes during several milliseconds,
which can cause it to start off with wrong dimensions.
This fixes the second part of https://savannah.gnu.org/bugs/?67635.
The issue was reported, and the solution suggested, by `twofiftysix`.
Buglet has existed for a long time.
Otherwise 'currmenu' still has an invalid value, causing a division by
zero in bottombars() because shown_entries_for() returns zero.
This fixes the first part of https://savannah.gnu.org/bugs/?67635.
The issue was reported by `twofiftysix`.
Bug existed since version 8.6, commit 09d574ba.
The feature is activated by preceding the command with two pipes (||).
This lets the command's output go to the terminal, enabling the user
to implement the OSC52 copy-to-clipboard command with a string bind:
bind M-* "{execute}|| printf "\033]52;c;%s\007" "$(base64 | tr -d '\n')" {enter}{undo}" main
This keystroke now copies the buffer (or the selected region) to the
local system clipboard, also when nano is running on a remote host --
if and when the used terminal implements the OSC52 command.
Inspired-by: Alessandro Carminati <alessandro.carminati@gmail.com>
This fixes https://savannah.gnu.org/bugs/?67581.
Reported-by: Ivan Vorontsov <ivrntsv@yandex.ru>
Bug existed since version 8.6, since relative jumps were introduced.
When Enter is pressed at the end of a line that contains only blanks
while --autoindent is in effect, and thus this line gets emptied, then
the mark should be adjusted accordingly (when somewhere on this line).
This fixes https://savannah.gnu.org/bugs/?67578.
The issue was reported by `correctmost`.
Bug existed since version 2.8.1, commit 005ee8ed, but
became more exposed since version 4.0, commit f7f5514e.
This fixes https://savannah.gnu.org/bugs/?67405.
Reported-by: Ivan Vorontsov <ivrntsv@yandex.ru>
Bug existed since version 2.7.2, since word completion was introduced.
Until two commits ago, a full refresh (^L) would first refresh the
screen and then reread the file list and redo the screen again.
Now it will just reread the list and redo the screen, skipping the
redundant refresh. The latter is done only for the tiny version.
Also rename a label, to be more precise.
The user may have resized the window not only while in the help viewer
but also while at the Search or Goto prompt. Ensure that after all of
them the browser rebuilds the list according to the current dimensions.
This fixes https://savannah.gnu.org/bugs/?67294.
Bug existed since version 2.5.3, commit 813f9f72.