mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
Made history saving/loading respect the 'do not save duplicate lines' setting
This commit is contained in:
parent
50b84c3e91
commit
6888c6ef60
1 changed files with 7 additions and 1 deletions
|
@ -179,7 +179,13 @@ class Legacy(BaseMode, component.Component):
|
||||||
for line in self.lines:
|
for line in self.lines:
|
||||||
line = format_utils.remove_formatting(line)
|
line = format_utils.remove_formatting(line)
|
||||||
if line.startswith(">>> "):
|
if line.startswith(">>> "):
|
||||||
self.input_history.append( line[4:] )
|
input = line[4:]
|
||||||
|
if self.console_config["ignore_duplicate_lines"]:
|
||||||
|
if len(self.input_history) > 0:
|
||||||
|
if self.input_history[-1] != input:
|
||||||
|
self.input_history.append(input)
|
||||||
|
else:
|
||||||
|
self.input_history.append(input)
|
||||||
|
|
||||||
self.input_history_index = len(self.input_history)
|
self.input_history_index = len(self.input_history)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue