summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ivymon31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/ivymon b/src/ivymon
index 78f64cf..92c2892 100755
--- a/src/ivymon
+++ b/src/ivymon
@@ -94,7 +94,7 @@ use Tk::CmdLine;
use vars qw/$VERSION $opt_help $opt_b $opt_bus $opt_history @opt_bind $opt_verbose
@opt_send $opt_size $opt_undersize $opt_out $opt_debug $opt_buf/;
# **** VERSION ****
-$VERSION = '1.28'; # TODO a modifier
+$VERSION = '1.29'; # TODO a modifier
# options initialisation
# geometry
@@ -127,15 +127,12 @@ my $msgToSendFlag = 0;
my $searchIndex;
my $searchString;
-my %searchHistory;
my @searchHistory;
my $searchHistoryIndex = -1;
-my %sendHistory;
my @sendHistory;
my $sendHistoryIndex = -1;
-my %bindHistory;
my @bindHistory;
my $bindHistoryIndex = -1;
@@ -1954,11 +1951,10 @@ sub bindingsGenList {
sub bindHistoryGenList {
my $string = shift;
- return if $bindHistory{$string};
- $bindHistory{$string} = 1;
- push(@bindHistory, $string);
- $bindHistoryIndex = $#bindHistory;
-
+ unless (scalar(@bindHistory) > 0 and $string eq $bindHistory[-1]) {
+ push(@bindHistory, $string);
+ $bindHistoryIndex = $#bindHistory;
+ }
} # end bindHistoryGenList
#----------------------------------------------------------------------------------
@@ -2073,10 +2069,10 @@ sub sendGenList {
sub sendHistoryGenList {
my $string = shift;
- return if $sendHistory{$string};
- $sendHistory{$string} = 1;
- push(@sendHistory, $string);
- $sendHistoryIndex = $#sendHistory;
+ unless (scalar(@sendHistory) > 0 and $string eq $sendHistory[-1]) {
+ push(@sendHistory, $string);
+ $sendHistoryIndex = $#sendHistory;
+ }
} # end sendHistoryGenList
@@ -2159,11 +2155,10 @@ sub clearSearch {
sub searchHistoryGenList {
my $string = shift;
- return if $searchHistory{$string};
- $searchHistory{$string} = 1;
- push(@searchHistory, $string);
- $searchHistoryIndex = $#searchHistory;
-
+ unless (scalar(@searchHistory) > 0 and $string eq $searchHistory[-1]) {
+ push(@searchHistory, $string);
+ $searchHistoryIndex = $#searchHistory;
+ }
} # end searchHistoryGenList
sub searchOnTheFly {