Исправлен поиск процедуры в тексте по клику в дереве

This commit is contained in:
svkalinin 2022-08-03 13:00:34 +03:00
parent 70a731d402
commit d7eef2b5f8
3 changed files with 6 additions and 6 deletions

View File

@ -348,9 +348,9 @@ namespace eval Editor {
#bind . <Control-udiaeresis> PageTab #bind . <Control-udiaeresis> PageTab
bind $txt <Insert> {OverWrite} bind $txt <Insert> {OverWrite}
bind $txt <ButtonRelease-1> [] bind $txt <ButtonRelease-1> []
bind $txt <Button-3> {catch [PopupMenuEditor %X %Y]} # bind $txt <Button-3> {catch [PopupMenuEditor %X %Y]}
bind $txt <Button-4> "%W yview scroll -3 units" # bind $txt <Button-4> "%W yview scroll -3 units"
bind $txt <Button-5> "%W yview scroll 3 units" # bind $txt <Button-5> "%W yview scroll 3 units"
#bind $txt <Shift-Button-4> "%W xview scroll -2 units" #bind $txt <Shift-Button-4> "%W xview scroll -2 units"
#bind $txt <Shift-Button-5> "%W xview scroll 2 units" #bind $txt <Shift-Button-5> "%W xview scroll 2 units"
bind $txt <<Modified>> "SetModifiedFlag $w" bind $txt <<Modified>> "SetModifiedFlag $w"

View File

@ -119,7 +119,7 @@ ttk::scrollbar $frmTree.v -orient vertical -command [list $frmTree.tree yview]
bind $tree <Double-ButtonPress-1> {Tree::DoublePressItem $tree} bind $tree <Double-ButtonPress-1> {Tree::DoublePressItem $tree}
bind $tree <ButtonRelease> {Tree::PressItem $tree} bind $tree <ButtonRelease-1> {Tree::PressItem $tree}
grid $tree -row 0 -column 0 -sticky nsew grid $tree -row 0 -column 0 -sticky nsew
grid $frmTree.v -row 0 -column 1 -sticky nsew grid $frmTree.v -row 0 -column 1 -sticky nsew
@ -167,4 +167,3 @@ if {$cfgVariables(toolBarShow) eq "true"} {
ttk::style configure . \ ttk::style configure . \
-foreground $::cfgVariables(guiFG) \ -foreground $::cfgVariables(guiFG) \
-font $::cfgVariables(guiFont) -font $::cfgVariables(guiFont)

View File

@ -94,8 +94,9 @@ namespace eval Tree {
} }
func { func {
set parentItem [$tree parent $id] set parentItem [$tree parent $id]
puts $values
$nbEditor select $nbEditor.[string range $parentItem [expr [string last "::" $parentItem] + 2] end] $nbEditor select $nbEditor.[string range $parentItem [expr [string last "::" $parentItem] + 2] end]
Editor::FindFunction "func $values" Editor::FindFunction "func.*?$values"
} }
procedure { procedure {
set parentItem [$tree parent $id] set parentItem [$tree parent $id]