(testsuite) Allow possibly leading whitespace in match_items() chunks > 1.
Thanks to Freddy Vulto.
This commit is contained in:
parent
7a4e09a6ac
commit
ef7f9dc89e
@ -503,7 +503,8 @@ proc match_items {items test {prompt /@} {size 20}} {
|
||||
set items [bash_sort $items]
|
||||
set result false
|
||||
for {set i 0} {$i < [llength $items]} {set i [expr {$i + $size}]} {
|
||||
set expected ""
|
||||
# For chunks > 1, allow leading whitespace
|
||||
if {$i > $size} { set expected "\\s*" } else { set expected "" }
|
||||
for {set j 0} {$j < $size && $i + $j < [llength $items]} {incr j} {
|
||||
set item "[lindex $items [expr {$i + $j}]]"
|
||||
# Escape special regexp characters
|
||||
|
Loading…
x
Reference in New Issue
Block a user