nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] tweaks: remove the now-unneeded code related to brackete


From: Benno Schulenberg
Subject: Re: [PATCH 2/2] tweaks: remove the now-unneeded code related to bracketed pasting
Date: Sun, 19 Jan 2020 11:29:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Op 17-01-2020 om 17:02 schreef Benno Schulenberg:
>       /* When <Tab> is pressed while the mark is on, do an indent. */
>       if (retval == TAB_CODE && openfile->mark && currmenu == MMAIN &&
> -                             !bracketed_paste && openfile->mark != 
> openfile->current)
> +                                                     openfile->mark != 
> openfile->current)
>               return INDENT_KEY;

Yesterday, I realized that this translation-suppression needs to stay.
When you just set the mark, type a few characters, and then paste something,
it seems to work fine.  But that is because the whole paste gets read into
nano's keyboard buffer at once, and while that happens, mark and cursor are
still sitting on the same line, so translation doesn't happen.  But when
you then do the same paste (that contains tabs) a second time, nano will
beep and eat the tabs.


But... while testing this, I found another bug, a very old bug: when you set
the mark and then immediately paste something (with ^U), then the pasted text
is *not* marked.  This is wrong.  Pico *does* mark such pasted text.

This bug exists since nano-2.0.7!  Weird that no one ever noticed.

Reported as https://savannah.gnu.org/bugs/?57631.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]