nano-devel
[Top][All Lists]
Advanced

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

nano hangs when pasting just a few characters


From: Doug Smythies
Subject: nano hangs when pasting just a few characters
Date: Sun, 23 Feb 2025 22:00:28 -0800

Hi,

Note: I am not subscribed, please C.C. me on any reply.

I have been having an issue where nano will freeze after a paste of some 
characters.
The only way out was to close the terminal and start again.
It doesn't happen often but is annoying when it does.
After investigation, and after reading it somewhere in your stuff, it seems 
I can unfreeze things by pasting a different length of buffer.

To make a long story shorter, my issue ends ups having started with
commit f705a9674b2ad75702f2c1e8c989558d45a7d243
input: recognize the start and stop sequences of a bracketed paste

and is sort of fixed with
commit 4a915b1ed581967350591c67965374f90e673030
input: avoid hanging after a 39-character paste on a VSCode terminal
As mentioned in the commit, there is an undesired ~ character
pasted where previously the session would have frozen.

Originally, I dismissed the related bug report
https://savannah.gnu.org/bugs/?64996
because my issue seemed different, as I was only pasting 5 characters.

I am using Win32-OpenSSH on a windows computer to
communicate with various Linux computers.

The bug report mentioned a useful debug method to acquire
the keyboard strokes. Using it I do see the split bracketed paste
after just a paste buffer size of 5 characters:

doug@s19:~/c$ cat TRAIL2
Sequence of hex codes: 102 < down arrow (position cursor for paste)
Sequence of hex codes: 168 < END key
Sequence of hex codes: 104 < right arrow
Sequence of hex codes: 104 < right arrow (cursor now in paste position)
Sequence of hex codes:  1b  5b  32  30  30  7e  31  30  30  30  30  1b  5b  32  
30  31
< "Begin of pasted text" - "10000" - part of "end of pasted text" sequence
Sequence of hex codes:  7e < the last character of the end sequence. Appears in 
the paste as a "tilde" character
Sequence of hex codes:  18 < CAN (cancel. I am terminated nano)
Sequence of hex codes:  6e < n. No, I don't want to save the file

It seems to break for such a short paste buffer.
Try a little longer:

doug@s19:~/c$ cat TRAIL4
Sequence of hex codes: 102
Sequence of hex codes: 168
Sequence of hex codes: 104
Sequence of hex codes: 104
Sequence of hex codes:  1b  5b  32  30  30  7e  23  64  65  66  69  6e  65  20  
4d  41
Sequence of hex codes:  58  5f  4a  50  53  20  31  30  30  30  30  1b  5b  32  
30  31  7e
< This time the terminating bracketed paste sequence is not broken into two 
lines.  
Sequence of hex codes:  18
Sequence of hex codes:  6e

So why this email? Might this be a bug with Win32-OpenSSH and should
I be filing a bug report there. I already started a discussion (needs updating
with my findings from today, but it is late now in my time zone):
https://github.com/PowerShell/Win32-OpenSSH/discussions/2330

If you got this far, thank you for reading.
Doug Smythies





reply via email to

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