Добавлен поиск переменной в тексте после открытия файла где она указана

master
Sergey Kalinin 2022-09-18 10:46:59 +03:00
parent c755e79517
commit 02bc6e852d
2 changed files with 12 additions and 4 deletions

View File

@ -165,7 +165,7 @@ proc SearchVariable {txt} {
proc GetVariableFilePath {txt} {
set str [$txt get {insert linestart} {insert lineend}]
if [regexp -nocase -all -- {^([0-9A-Za-z\-_:]*?) :: (.*?) :: (.*?)$} $str match vName vValue vPath] {
return $vPath
return [list $vName $vPath]
}
}
proc FindVariablesDialog {txt args} {
@ -246,10 +246,14 @@ proc FindVariablesDialog {txt args} {
# puts "- $id - $values - $key"
# regsub -all {PROCNAME} $findString $values str
# Editor::FindFunction "$str"
set path [GetVariableFilePath $win.lBox]
set _v [GetVariableFilePath $win.lBox]
set varName [lindex $_v 0]
set path [lindex $_v 1]
unset _v
if {$path ne ""} {
destroy .findVariables
FileOper::Edit $path
Editor::FindFunction "$varName"
}
# $txt tag remove sel 1.0 end
# focus $Editor::txt.t
@ -257,10 +261,14 @@ proc FindVariablesDialog {txt args} {
}
# bind $win.lBox <Double-ButtonPress-1> {Tree::DoublePressItem $win.lBox}
bind $win.lBox <ButtonRelease-1> {
set path [GetVariableFilePath $win.lBox]
set _v [GetVariableFilePath $win.lBox]
set varName [lindex $_v 0]
set path [lindex $_v 1]
unset _v
if {$path ne ""} {
destroy .findVariables
FileOper::Edit $path
Editor::FindFunction "$varName"
}
break
}

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
######################################################
# Version: 2.0.0
# Release: alpha
# Build: 18092022095233
# Build: 18092022102313
######################################################
# определим текущую версию, релиз и т.д.