1
0
Fork 0

prop_key_handler: improve search function; update comments

This commit is contained in:
mfranz 2009-05-06 20:37:40 +00:00
parent 98bead93b7
commit e3743f2ae7

View file

@ -14,7 +14,7 @@
# <property>* -> print property and all children to terminal # <property>* -> print property and all children to terminal
# <property>! -> add property to display list (reset list with /!) # <property>! -> add property to display list (reset list with /!)
# <property>: -> open property browser in this property's directory # <property>: -> open property browser in this property's directory
# <string>? -> print all properties whose path contains this string # <string>? -> print all properties whose path or value contains this string
# #
# #
# Keys: # Keys:
@ -25,7 +25,7 @@
# <Shift-TAB> ... like <TAB> but cycles backwards # <Shift-TAB> ... like <TAB> but cycles backwards
# <CurUp>/<CurDown> ... switch back/forth in the history # <CurUp>/<CurDown> ... switch back/forth in the history
# <Escape> ... cancel the operation # <Escape> ... cancel the operation
# <Shift-Backspace> ... remove last, whole path element # <Shift-Backspace> ... remove last whole path element
# #
# #
# Colors: # Colors:
@ -283,7 +283,7 @@ var print_prop = func(n) {
var search = func(n, s) { var search = func(n, s) {
if (find(s, n.getPath()) >= 0) if (find(s, n.getPath()) >= 0)
print_prop(n); print_prop(n);
if (n.getType() != "NONE" and find(s, "" ~ n.getValue()) >= 0) elsif (n.getType() != "NONE" and find(s, "" ~ n.getValue()) >= 0)
print_prop(n); print_prop(n);
foreach (var c; n.getChildren()) foreach (var c; n.getChildren())
search(c, s); search(c, s);