diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-26 14:56:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-26 14:56:23 +0000 |
commit | 5e628c50f3a3e10f9e6a4a270143f1a3076296e1 (patch) | |
tree | 81736c88fe3aa9b3eb7d75ac40195fa9aba30782 | |
parent | b45d8989f54d8194d72c7049dc48d424db23d09f (diff) | |
download | rpmdrake-5e628c50f3a3e10f9e6a4a270143f1a3076296e1.tar rpmdrake-5e628c50f3a3e10f9e6a4a270143f1a3076296e1.tar.gz rpmdrake-5e628c50f3a3e10f9e6a4a270143f1a3076296e1.tar.bz2 rpmdrake-5e628c50f3a3e10f9e6a4a270143f1a3076296e1.tar.xz rpmdrake-5e628c50f3a3e10f9e6a4a270143f1a3076296e1.zip |
(do_search) remove leading/trailing spacing in searched word when pasting (#23249)
-rwxr-xr-x | rpmdrake | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -55,6 +55,12 @@ our $statusbar; sub do_search($$$$$$$) { my ($find_entry, $tree, $tree_model, $options, $current_search_type, $urpm, $pkgs) = @_; my $entry = $find_entry->get_text or return; + # remove leading/trailing spacing when pasting: + if ($entry !~ /\S\s\S/) { + # if spacing in middle, likely a string search in description + $entry =~ s/^\s*//; + $entry =~ s/^\s*$//; + } my $entry_rx = eval { qr/$entry/i } or return; my $results_ok = N("Search results"); $options->{delete_category}->($_) foreach $results_ok; |