Исправлен поиск имени функции

This commit is contained in:
svkalinin 2022-11-24 10:46:30 +03:00
parent 8b8fd6fd5f
commit 976aa30657

View File

@ -930,11 +930,12 @@ namespace eval Editor {
} }
proc FindFunction {txt findString} { proc FindFunction {txt findString} {
puts "txt: $txt, $findString"
set pos "0.0" set pos "0.0"
$txt see $pos $txt see $pos
set line [lindex [split $pos "."] 0] set line [lindex [split $pos "."] 0]
set x [lindex [split $pos "."] 1] set x [lindex [split $pos "."] 1]
set pattern "$findString\\W" set pattern "$findString\(\\W\|\$\)"
set pos [$txt search -nocase -regexp $pattern $line.$x end] set pos [$txt search -nocase -regexp $pattern $line.$x end]
$txt mark set insert $pos $txt mark set insert $pos
$txt see $pos $txt see $pos