[dev] [PATCH] Disable bracked paste in reset

0 views
Skip to first unread message

Roberto E. Vargas Caballero

unread,
Nov 28, 2025, 10:32:57 AMNov 28
to d...@suckless.org, Roberto E. Vargas Caballero
Sadly, there are too many programs today that enable this mode
and it is becoming very common to find the terminal adding
characters before and after in every of your pastes. A reset
should disable this mode.
---
st.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/st.c b/st.c
index 8e57991..e55e7b3 100644
--- a/st.c
+++ b/st.c
@@ -2358,6 +2358,7 @@ eschandle(uchar ascii)
resettitle();
xloadcols();
xsetmode(0, MODE_HIDE);
+ xsetmode(0, MODE_BRCKTPASTE);
break;
case '=': /* DECPAM -- Application keypad */
xsetmode(1, MODE_APPKEYPAD);
--
2.46.1


Roberto E. Vargas Caballero

unread,
Nov 29, 2025, 6:19:18 AMNov 29
to dev mail list
Hi,

On Fri, Nov 28, 2025 at 04:31:59PM +0100, Roberto E. Vargas Caballero wrote:
> diff --git a/st.c b/st.c
> index 8e57991..e55e7b3 100644
> --- a/st.c
> +++ b/st.c
> @@ -2358,6 +2358,7 @@ eschandle(uchar ascii)
> resettitle();
> xloadcols();
> xsetmode(0, MODE_HIDE);
> + xsetmode(0, MODE_BRCKTPASTE);
> break;

Other option is to add this sequence to the reset terminfo capability.
In fact, I think we should add other sequences there too.


Regards,

Reply all
Reply to author
Forward
0 new messages