Hello,

The new keysym-list perl extension has a small bug. The manual states:

    You can define a range of keysyms in one shot by loading the
    "keysym-list" perl extension and providing a string with pattern
    list/PREFIX/MIDDLE/SUFFIX

However, keysym strings of the form:

    list/\033/abcd/     # Empty suffix!

result in an error, because the extension calls split() on the passed
string, resulting in an array of 3 strings, and not 4, as expected.

Since the manual does not mention that the suffix is mandatory, and as
it was not mandatory in older versions, I believe this is a regression.

Trivial patch follows inline.

Thanks to the dev team for continuing to support keysym list syntax!

Cheers,
Sung Pae


>From d2014d084d6460aff0d2af70523c0e8ec27e4a0e Mon Sep 17 00:00:00 2001
From: guns <[email protected]>
Date: Thu, 12 Jan 2012 19:44:27 -0600
Subject: [PATCH] keysym-list should not require a suffix

---
 src/perl/keysym-list |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/perl/keysym-list b/src/perl/keysym-list
index 47c6e0a..07b88ae 100644
--- a/src/perl/keysym-list
+++ b/src/perl/keysym-list
@@ -5,7 +5,7 @@ sub on_register_command {
 
    if ($str =~ /^list(.)/) {
       my @list = split /\Q$1/, $str;
-      if (@list == 4) {
+      if (@list == 3 or @list == 4) {
          $self->register_command ($keysym++, $state, "$list[1]$_$list[3]")
             for split //, $list[2];
 
-- 
1.7.8.167.g57526

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to