From e4f62031c585cbc4a45230714e13821b9bfca34c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 11 Oct 1999 17:35:35 +0000 Subject: no_comment --- perl-install/my_gtk.pm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'perl-install/my_gtk.pm') diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index ede3a2d78..2f8eb812e 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -388,18 +388,21 @@ sub _ask_from_list($$$$) { Gtk->timeout_remove($timeout) if $timeout; $timeout = ''; - if ($e->{state} & 4) { - #- control pressed - $start_reg = $start_reg ? '' : "^" if $c eq "s"; - } elsif ($e->{keyval} >= 0x100) { + if ($e->{keyval} >= 0x100) { &$leave if $c eq "\r" || $c eq "\x8d"; - $starting_word = ''; + $starting_word = '' if $e->{keyval} != 0xffe4; # control } else { - &$leave if $c eq ' '; - - $curr++ if $starting_word eq '' || $starting_word eq $c; - $starting_word .= $c unless $starting_word eq $c; - + if ($e->{state} & 4) { + #- control pressed + $c eq "s" or return 1; + $start_reg and $start_reg = '', return 1; + $curr++; + } else { + &$leave if $c eq ' '; + + $curr++ if $starting_word eq '' || $starting_word eq $c; + $starting_word .= $c unless $starting_word eq $c; + } my $word = quotemeta $starting_word; my $j; for ($j = 0; $j < @$l; $j++) { $l->[($j + $curr) % @$l] =~ /$start_reg$word/i and last; -- cgit v1.2.1