From 174893376774e014af60ecd3e61f3c45e5eb0e4d Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Thu, 15 Feb 2018 17:04:11 +0300 Subject: [PATCH] Fixed parsing procedure with names like ::proc::name or proc_na::me(aa) and parameters {{} {} {}} --- CHANGELOG | 3 +++ lib/editor.tcl | 6 +++++- lib/help.tcl | 10 ++++------ lib/html_lib.tcl | 2 -- lib/main.tcl | 2 ++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0a4c317..ff6b4f1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ - Fixed AutoComplite precedure for TCL/TK-projects - Added colored icon for main window - Fixed "Close all" procedure if opened files from projects and file browser +- Fixed parsing some procedure name like ::proc::name or proc_na::me(aa) and parameters {{} {} {}} 13.02.2018 - Added gray theme @@ -361,3 +362,5 @@ characters to the right of the insertion cursor. - Fix error with select active project after creating new project - Fix small error with delete project procedure - Fix uncorrect cursor position counter into editor + + diff --git a/lib/editor.tcl b/lib/editor.tcl index 9152f24..dbe92fc 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -948,7 +948,10 @@ proc EditFile {tree node fileName} { } ################### - if {[regexp -nocase -all -line -- {proc (.*) \{(.*)\}} $line match procName params]} { + #regexp -nocase -all -line -- {proc (::|)(\w+)(::|)(\w+) \{(.*)\} \{} string match v1 v2 v3 v4 v5 + #regexp -nocase -all -line -- {proc (.*) \{(.*)\}} $line match procName params + if {[regexp -nocase -all -line -- {proc (::|)(\w+)(::|)(\w+) \{(.*)\} \{} $line match v1 v2 v3 v4 params]} { + set procName "$v1$v2$v3$v4" lappend procList($activeProject) [list $procName [string trim $params]] puts "proc $procName $params" } @@ -1281,5 +1284,6 @@ GetOp + diff --git a/lib/help.tcl b/lib/help.tcl index f74beaa..51bc6b4 100644 --- a/lib/help.tcl +++ b/lib/help.tcl @@ -273,12 +273,9 @@ proc TopLevelHelp {} { entry $frmSrchEnt.entSearch set lstSearch [listbox $frmSrchList.lstSearch -font $fontNormal\ - -yscrollcommand\ - {.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhList.scrListY set}\ - -xscrollcommand\ - {.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhScrollX.scrListX set}\ - -selectmode single -selectbackground #55c4d1\ - -selectborderwidth 0] + -yscrollcommand {.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhList.scrListY set}\ + -xscrollcommand {.help.frmBody.frmCat.nBookTree.fhlpSearch.frmScrhScrollX.scrListX set}\ + -selectmode single -selectbackground #55c4d1 -selectborderwidth 0] scrollbar $frmSrchList.scrListY -command\ {$frmSrchList.lstSearch yview} -borderwidth {1} -width {10} -takefocus 0 @@ -324,3 +321,4 @@ proc TopLevelHelp {} { #GetContent $docDir/tcl.toc.html + diff --git a/lib/html_lib.tcl b/lib/html_lib.tcl index bbb9b81..d9a6f44 100644 --- a/lib/html_lib.tcl +++ b/lib/html_lib.tcl @@ -1435,5 +1435,3 @@ proc HM::cgiMap {data} { #} - - diff --git a/lib/main.tcl b/lib/main.tcl index 7a8dd53..0a356d6 100644 --- a/lib/main.tcl +++ b/lib/main.tcl @@ -308,6 +308,7 @@ proc add_toolbar_button {path icon command helptext} { } # Separator for toolbar set sepIndex 0 + proc Separator {} { global sepIndex editor set f [frame .frmTool.separator$sepIndex -width 10 -border 1 \ @@ -492,3 +493,4 @@ $tree configure -redraw 1 set activeProject "" focus -force $tree +