A look at terminal emulators, part 1
A look at terminal emulators, part 1
Posted Mar 31, 2018 23:54 UTC (Sat) by domo (guest, #14031)In reply to: A look at terminal emulators, part 1 by domo
Parent article: A look at terminal emulators, part 1
Ok, I did have my own version, for which I used some amount of time to figure out.
Here is the full diff compared to confirm-paste in urxvt github repository:
Here is the full diff compared to confirm-paste in urxvt github repository:
--- Downloads/confirm-paste.txt 2018-04-01 02:49:34.886913091 +0300
+++ dotdir/urxvt/chomp-and-confirm-paste 2018-04-01 02:40:11.030578963 +0300
@@ -21,9 +21,14 @@
sub on_tt_paste {
my ($self, $str) = @_;
+ chomp $str; $str =~ tr/\033//d;
+
my $count = ($str =~ tr/\012\015//);
- return unless $count;
+ unless ($count) {
+ $self->tt_paste ($str);
+ return 1;
+ }
$self->{paste} = \$str;
$self->msg ("Paste of $count lines, continue? (y/n)");