nano-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] input: recognize the start and stop sequences of a brack


From: Benno Schulenberg
Subject: Re: [PATCH 1/2] input: recognize the start and stop sequences of a bracketed paste
Date: Sun, 12 Jan 2020 11:59:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Op 11-01-2020 om 03:03 schreef Brand Huntsman:
> On Fri, 10 Jan 2020 15:56:13 +0100 Benno Schulenberg <address@hidden>
> wrote:
> 
>>> + if (*kbinput != 0x9 && *kbinput != 0xA && *kbinput != 0xD)
>> 
>> Why is 0x0A allowed to pass through?  Although a paste should normally not
>> contain any linefeeds, if one does, it would result in justifying the
>> current paragraph, which is unwanted behavior when pasting.
> 
> I thought LF was used and added CR so it could be pasted into a DOS/MAC file.
> But it appears terminals convert LF to CR in pastes
> (https://security.stackexchange.com/a/52655).

They should.  But there have been situations where some didn't (mostly
involving Putty): https://nano-editor.org/dist/latest/faq.html#4.7

With the proposed two changes, I have pushed the patch set to master:

  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=f705a967
  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=7d483987

Thanks for the bracketed-paste-mode recognition patch.

I will update the FAQ to note the improved behavior.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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