diff --git a/lib/editor.tcl b/lib/editor.tcl index 1a2ebc5..a7c6a6f 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -694,7 +694,7 @@ namespace eval Editor { bind $txt <> "SetModifiedFlag $w $nb auto" bind $txt "Editor::SearchBrackets %W" bind $txt "Editor::SearchBrackets %W" - bind $txt "catch {Editor::GoToFunction $txt}" + bind $txt "catch {Editor::GoToFunction $txt}; break" bind $txt "catch {Editor::GoToFunction $txt}; break" bind $txt {Redo; break} bind $txt "catch {Editor::GoToFunction $txt}; break" diff --git a/lib/notebook.tcl b/lib/notebook.tcl index 91cd555..9ade731 100644 --- a/lib/notebook.tcl +++ b/lib/notebook.tcl @@ -13,6 +13,7 @@ namespace eval NB { proc InsertItem {nb item type} { switch $type { file { + set titleFileName [file tail $item] set item [string tolower $item] regsub -all {\.|/|\\|\s|:} $item "_" itemName # puts "$item -> $itemName" @@ -21,7 +22,7 @@ namespace eval NB { } else { set fm [ttk::frame $nb.$itemName] pack $fm -side top -expand true -fill both - $nb add $fm -text [file tail $item];# -image close_12x12 -compound right + $nb add $fm -text $titleFileName;# -image close_12x12 -compound right $nb select $fm } }