Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ollowtf
rxvt-unicode
confirm-paste-Change-y-p-n-to-y-f-n-to-preserve...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File confirm-paste-Change-y-p-n-to-y-f-n-to-preserve-comp.patch of Package rxvt-unicode
From a1e92edfe0fca02ab39fa29ba23982668e19dfc1 Mon Sep 17 00:00:00 2001 From: Michal Suchanek <msuchanek@suse.de> Date: Sat, 2 Dec 2023 13:41:05 +0100 Subject: [PATCH] confirm-paste: Change y/p/n to y/f/n to preserve compatibility with previous y/n Initially confirm-paste offerted only two choices y(yes)/n(no). That was later changed to y(filter)/p(yes)/n(no). Change to y(yes)/f(filter)/n(no) to be compatible with the initial implementation. Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- src/perl/confirm-paste | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/perl/confirm-paste b/src/perl/confirm-paste index 30a42c09..8cac07c6 100644 --- a/src/perl/confirm-paste +++ b/src/perl/confirm-paste @@ -7,9 +7,9 @@ confirm-paste - ask for confirmation before pasting control characters =head1 DESCRIPTION Displays a confirmation dialog when a paste containing control characters -is detected. The user can choose C<y> to either paste a sanitized variant -where all control characters are removed, C<p> to paste the string -unmodified or C<n> to drop the paste request completely. +is detected. The user can either choose C<y> to paste the string unmodified, +C<f> to paste a sanitized variant where all control characters are removed, +or C<n> to drop the paste request completely. This is mostly meant as a defense-in-depth mechanism to protect against the common web browser bug of you selecting some text but the browser @@ -25,7 +25,7 @@ U+001F currrently) is pasted into the terminal, this extension will ask whether it should be pasted. Strings without control characters get pasted without prompt. -When a sanitized version is pasted (choice C<y>), then contiguous +When a sanitized version is pasted (choice C<f>), then contiguous sequences of those control characters will be replaced by a single spaces. The exact detection and sanitization algorithm is subject to change in @@ -47,7 +47,7 @@ sub on_tt_paste { or return; $self->{paste} = \$str; - $self->msg ("Pasting $count control characters, continue? (y/p/n)"); + $self->msg ("Pasting $count control characters, continue? (y/f/n)"); my $preview = substr $self->locale_decode ($str), 0, $self->ncol; $preview =~ s/\n/\\n/g; @@ -72,12 +72,12 @@ sub key_press { my $paste = delete $self->{paste}; - if ($keysym == 121) { # y + if ($keysym == 102) { # f my $paste = $$paste; $paste =~ s/[\x00-\x1f]+/ /g; $self->tt_paste ($paste); $self->leave; - } elsif ($keysym == 112) { # p + } elsif ($keysym == 121) { # y $self->tt_paste ($$paste); $self->leave; } elsif ($keysym == 110) { # n -- 2.42.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor