diff --git a/debian/changelog b/debian/changelog index 91f3862..def7033 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +projman (2.0.0-alpha23) stable; urgency=medium + + * Исправлен флаг модификации при открытии файла + * Исправлена 'Отмена' до пустого файла. Внес исправления на основе изменений https://github.com/wandrien/projman + * Исправлено поведение при сочетании клавиш Control-y (повторение последнего действия) + + -- svk Mon, 19 Jan 2026 14:49:29 +0300 + projman (2.0.0-alpha22) stable; urgency=medium * Исправил закрытие вкладок редактора и сохранение файла при разделении экрана. diff --git a/lib/editor.tcl b/lib/editor.tcl index 10572a1..828a9fc 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -796,7 +796,7 @@ namespace eval Editor { bind $txt "Editor::Comment $txt $fileType" bind $txt "Editor::Uncomment $txt $fileType" bind $txt Find - bind $txt {OverWrite} + # bind $txt {OverWrite} bind $txt "Editor::SearchBrackets $txt" bind $txt "Editor::SelectionHighlight $txt" bind $txt <> "SetModifiedFlag $w $nb auto" @@ -804,6 +804,7 @@ namespace eval Editor { bind $txt "Editor::SearchBrackets %W" bind $txt "catch {Editor::GoToFunction $txt}" bind $txt "catch {Editor::GoToFunction $txt}; break" + bind $txt {Redo; break} bind $txt "catch {Editor::GoToFunction $txt}; break" bind $txt "$txt delete {insert wordstart} {insert wordend}" bind $txt "$txt delete {insert wordstart} {insert wordend}" diff --git a/lib/gui.tcl b/lib/gui.tcl index ef7de71..e24f8b3 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -25,8 +25,8 @@ bind . Quit bind . Quit bind . Quit bind . Quit -bind . Add -bind . Del +# bind . Add +# bind . Del bind . ShowHelpDialog bind . Editor::New bind . Editor::New @@ -62,6 +62,21 @@ bind . { } } +# ------------- +# Thanks https://github.com/wandrien/ +# https://github.com/wandrien/projman/commit/22f6e235c3532c20573d44ee7eaaaa1fb56ad544 +event add <> +event add <> +event add <> + +set latestTxtWidget {} +bind all { + if {[winfo class %W] eq "Ctext"} { + global latestTxtWidget + set latestTxtWidget %W + } +} +# --------- bind . {FileOper::Save} bind . {FileOper::Save} bind . {FileOper::Save} diff --git a/lib/procedure.tcl b/lib/procedure.tcl index 2493408..79bbd6b 100644 --- a/lib/procedure.tcl +++ b/lib/procedure.tcl @@ -1134,3 +1134,24 @@ proc ExecutorCommandPathSetting {fileType} { puts $cfgVariables($fileType) } } + +# ----------- +# Thanks https://github.com/wandrien/ +# https://github.com/wandrien/projman/commit/22f6e235c3532c20573d44ee7eaaaa1fb56ad544 +proc SendEventToLatestTxtWidget {ev} { + global latestTxtWidget + if {$latestTxtWidget eq ""} { + return + } elseif {[winfo exists $latestTxtWidget] && [winfo class $latestTxtWidget] eq "Ctext"} { + event generate ${latestTxtWidget}.t $ev + } else { + set latestTxtWidget "" + } +} + +proc Cut {} { SendEventToLatestTxtWidget <> } +proc Copy {} { SendEventToLatestTxtWidget <> } +proc Paste {} { SendEventToLatestTxtWidget <> } +proc Undo {} { SendEventToLatestTxtWidget <> } +proc Redo {} { SendEventToLatestTxtWidget <> } +# ------------ diff --git a/projman.tcl b/projman.tcl index a28b83d..d002973 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@" ###################################################### # Version: 2.0.0 # Release: alpha23 -# Build: 19012026144418 +# Build: 21012026122731 ###################################################### # определим текущую версию, релиз и т.д. @@ -34,7 +34,6 @@ while {[gets $f line] >=0} { } close $f - package require msgcat package require inifile package require ctext