store 30 history entries by default (settable via property
/sim/gui/prop-key-handler/history-max-size)
This commit is contained in:
parent
59ff8c6129
commit
e5656fedc9
1 changed files with 2 additions and 2 deletions
|
@ -293,14 +293,14 @@ var search = func(n, s) {
|
|||
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||
foreach (var p; props.globals.getNode("/sim/gui/prop-key-handler/history", 1).getChildren("entry"))
|
||||
append(history, p.getValue());
|
||||
var max = props.globals.initNode("/sim/gui/prop-key-handler/history-max-size", 20).getValue();
|
||||
var max = props.globals.initNode("/sim/gui/prop-key-handler/history-max-size", 30).getValue();
|
||||
if (size(history) > max)
|
||||
history = subvec(history, size(history) - max);
|
||||
});
|
||||
|
||||
|
||||
_setlistener("/sim/signals/exit", func {
|
||||
var max = props.globals.initNode("/sim/gui/prop-key-handler/history-max-size", 20).getValue();
|
||||
var max = props.globals.initNode("/sim/gui/prop-key-handler/history-max-size", 30).getValue();
|
||||
if (size(history) > max)
|
||||
history = subvec(history, size(history) - max);
|
||||
forindex (var i; history) {
|
||||
|
|
Loading…
Reference in a new issue