Skip to content

Commit 068a35c

Browse files
adblesssucwong
authored andcommitted
console: fix autocomplete digit range to include 0 (#34003)
PR #26518 added digit support but used '1'-'9' instead of '0'-'9'. This breaks autocomplete for identifiers containing 0 like account0.
1 parent 897b591 commit 068a35c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

console/console.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (c *Console) AutoCompleteInput(line string, pos int) (string, []string, str
288288
for ; start > 0; start-- {
289289
// Skip all methods and namespaces (i.e. including the dot)
290290
c := line[start]
291-
if c == '.' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '1' && c <= '9') {
291+
if c == '.' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') {
292292
continue
293293
}
294294
// We've hit an unexpected character, autocomplete form here

0 commit comments

Comments
 (0)