Исправлена ошибка с некорректным определением виджета в процедуре получения выделенного текста.

This commit is contained in:
svk
2026-01-27 16:40:24 +03:00
parent 2dd7b7239e
commit d13a4adba5

View File

@@ -369,6 +369,9 @@ namespace eval Editor {
if {$txt eq ""} { if {$txt eq ""} {
DebugPuts "Editor::SelectionGet: [focus]" DebugPuts "Editor::SelectionGet: [focus]"
set txt [focus] set txt [focus]
if {![string match -nocase "*text*" $txt]} {
return ""
}
} }
set selBegin [lindex [$txt tag ranges sel] 0] set selBegin [lindex [$txt tag ranges sel] 0]
set selEnd [lindex [$txt tag ranges sel] 1] set selEnd [lindex [$txt tag ranges sel] 1]