Compare commits
2 Commits
f68cd75600
...
c9e804b614
Author | SHA1 | Date | |
---|---|---|---|
|
c9e804b614 | ||
|
4bf10a1d30 |
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -1,5 +1,11 @@
|
|||
projman (2.0.0-alpha2) stable; urgency=medium
|
||||
|
||||
* Fixed incorrect replacement of an expression when searching if there are multiple matches in a string
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 17 Jul 2024 12:20:00 +0300
|
||||
|
||||
projman (2.0.0-alpha) stable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 20 Jul 2022 16:56:31 +0300
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 27 Nov 2021 12:20:00 +0300
|
||||
|
|
|
@ -1173,20 +1173,32 @@ namespace eval Editor {
|
|||
set lstFindIndex [$txt search -all -nocase -count matchIndexPair $findString $line.$x end]
|
||||
# set symNumbers [string length "$findString"]
|
||||
}
|
||||
# puts $lstFindIndex
|
||||
puts $lstFindIndex
|
||||
# puts $matchIndexPair
|
||||
# set lstFindIndex [$txt search -all "$selectionText" 0.0]
|
||||
|
||||
# Найдем разницу в длине строк для установки правильного
|
||||
# индекса для выделения текста после вставки
|
||||
set stringLengthDiff [expr [string length $findString] - [string length $replaceString]]
|
||||
|
||||
set i 0
|
||||
foreach ind $lstFindIndex {
|
||||
foreach ind [lsort -dictionary -decreasing $lstFindIndex] {
|
||||
set selFindLine [lindex [split $ind "."] 0]
|
||||
set selFindRow [lindex [split $ind "."] 1]
|
||||
# set endInd "$selFindLine.[expr $selFindRow + $symNumbers]"
|
||||
set endInd "$selFindLine.[expr [lindex $matchIndexPair $i] + $selFindRow]"
|
||||
# puts "$ind; $selFindLine, $selFindRow; $endInd "
|
||||
puts "$ind; $selFindLine, $selFindRow; $endInd "
|
||||
if {$replaceString ne ""} {
|
||||
$txt replace $ind $endInd $replaceString
|
||||
# Вычисляем индекс вхождения строки после замены для выделения в тексте
|
||||
if {$stringLengthDiff > 0} {
|
||||
$txt tag add sel $ind "$endInd - [expr [tcl::mathfunc::abs $stringLengthDiff]] chars"
|
||||
} else {
|
||||
$txt tag add sel $ind "$endInd + [expr [tcl::mathfunc::abs $stringLengthDiff]] chars"
|
||||
}
|
||||
} else {
|
||||
$txt tag add sel $ind $endInd
|
||||
}
|
||||
incr i
|
||||
}
|
||||
.finddialog.lblCounter configure -text "[::msgcat::mc "Finded"]: $i"
|
||||
|
|
|
@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
|
|||
######################################################
|
||||
# Version: 2.0.0
|
||||
# Release: alpha
|
||||
# Build: 24062024101337
|
||||
# Build: 17072024122602
|
||||
######################################################
|
||||
|
||||
# определим текущую версию, релиз и т.д.
|
||||
|
|
Loading…
Reference in New Issue
Block a user