Добавлена логика для работы с troff/groff файлами

This commit is contained in:
2026-04-15 16:57:55 +03:00
parent 7356fe4a3b
commit 52ad7be0de
6 changed files with 57 additions and 7 deletions

View File

@@ -925,6 +925,22 @@ proc Execute {filePath w activeEditor} {
# Added executor from config
set fileType [string toupper [string trimleft [file extension $filePath] "."]]
switch -regexp -- $fileType {
[[:digit:]]+ {
if {[FileOper::GetFileMimeType $filePath] eq "troff"} {
set fileType TROFF
} else {
set fileType "Unknow"
}
}
^$ {
if {[FileOper::GetFileMimeType $filePath] eq "troff"} {
set fileType TROFF
} else {
set fileType "Unknow"
}
}
}
if {[info exists cfgVariables($fileType)] != 0 && $cfgVariables($fileType) ne ""} {
$w.frame.text insert end "$cfgVariables($fileType) %f"
}
@@ -1131,7 +1147,7 @@ proc ExecutorCommandPathSetting {fileType} {
}
if {[info exists cfgVariables($fileType)] == 0} {
set cfgVariables($fileType) ""
DebugPuts $cfgVariables($fileType)
DebugPuts "ExecutorCommandPathSetting: cfgVariables($fileType) = $cfgVariables($fileType)"
}
}