Сделана обработка шаблонов командной строки и запуск внешних инструментов.

This commit is contained in:
svk
2026-01-27 14:22:55 +03:00
parent bc2808c3e4
commit aaa027398a
3 changed files with 41 additions and 9 deletions

View File

@@ -363,15 +363,21 @@ namespace eval Editor {
}
}
proc SelectionGet {txt} {
variable selectionText
proc SelectionGet {{txt ""}} {
global nbEditor
variable selectionText ""
if {$txt eq ""} {
DebugPuts "Editor::SelectionGet: [focus]"
set txt [focus]
}
set selBegin [lindex [$txt tag ranges sel] 0]
set selEnd [lindex [$txt tag ranges sel] 1]
if {$selBegin ne "" && $selEnd ne ""} {
set selectionText [$txt get $selBegin $selEnd]
}
return $selectionText
}
proc SelectionHighlight {txt} {
variable selectionText
$txt tag remove lightSelected 1.0 end