Re: nano hangs when pasting just a few characters

Benno Schulenberg <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
Op 24-02-2025 om 07:00 schreef Doug Smythies:
> https://github.com/PowerShell/Win32-OpenSSH/discussions/2330

Well, actually nano no longer hangs for you since version 8.0, but
inserts a spurious tilde (~) after the paste.  Not nice, but... it
doesn't hang.

(You should have reported in your mail the exact version of nano
you are using.)

Please try the attached patch, to see if that helps avoiding the
end-of-paste escape sequence from getting split.


Benno
wait-long.patch (text/x-patch, 441 B)
diff --git a/src/nano.c b/src/nano.c
index b3f51e06..d5309b18 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2483,8 +2483,8 @@ int main(int argc, char **argv)
 	typeahead(-1);
 
 #ifdef HAVE_SET_ESCDELAY
-	/* Tell ncurses to pass the Esc key quickly. */
-	set_escdelay(50);
+	/* Tell ncurses to wait long for a sequence after an escape. */
+	set_escdelay(1200);
 #endif
 
 	/* Read the files mentioned on the command line into new buffers. */
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAme97KcFAwAAAAAACgkQUUu+Lrjhlh80
Vw//f9+fh5gNfcj6kyYwhND2XrFck+nLiIGX/ME1CpfHyBefU2hdR/F9+gMJtOSP6nrbcYqAGzSg
HdSs0wWg8sX0i8aaj7B3tsoQJMd0cNUu6nIJL2sVw8tRcTGUHOwoHd/0wqLy0UluslPBKFrjzDiy
Ik/8Tec5SWuQUPGmKiINXce+k4lgfVrfW04CXmTEg/AhejnBYuRbbYCnlIJ/JdCi8vGofh5f77GX
sBqXq+uo+QdGDOIcSN6uZUB8o7uj3NKFYfkURGjOBwxwWA/XDCwm18k0LkFhn+S6KsVg6WhF74ah
g6uec36wPx/3ZnWrUaBvOAY7PRNatH6ShKSwWhi4SRVLp2W3NbRh0Npl9ZIbYuZr+/EdrixWHcrj
RqSDchGSYt6Y8DQWHdJUSj0fZgmwLaR/fu6H7pHAY12GzCfTyRQb475reTd6tOFg3rMZLO3vahKe
6dVJ6HXJN7OAl7Ki+hWrW/5KKjzZhcwYYkpCjFUTFyZiQUxkJjSwAcoRStSmVPN0dRRmOzuLyZVg
OgkwwiEwszYKFv6ZFgJgIdB6A28/6MVz8AdBnJQ7bClNRT1cUY85pPJVwk+1lkzv1CLxGD6d5L0l
U/syZSTrhe41jSa5VdKNDrklykRZDDbGBDaNiIsMWpFspS1xoGeeMYY+PxWHKLmsP+LBEWILH07x
+hA=
=PfVI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.