summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoretienne2018-02-06 11:19:38 +0000
committeretienne2018-02-06 11:19:38 +0000
commit3cfa0525f83124432658a175600986c0919fbfcf (patch)
treec05436fe465296b0eb72429523498f7675b61e2b /src
parent76987d9e47d55e3dd3663fede1eb62fa195c4b20 (diff)
downloadivymon-3cfa0525f83124432658a175600986c0919fbfcf.zip
ivymon-3cfa0525f83124432658a175600986c0919fbfcf.tar.gz
ivymon-3cfa0525f83124432658a175600986c0919fbfcf.tar.bz2
ivymon-3cfa0525f83124432658a175600986c0919fbfcf.tar.xz
Correction concernant la navigation dans l'historique des saisies
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 {