proc edit_prop: better selection of value=".... \" .... \" ...": dont get confused by escaped quotes

This commit is contained in:
stefan schippers 2024-12-23 00:51:52 +01:00
parent 7a8ab78d11
commit 712b985333
1 changed files with 2 additions and 2 deletions

View File

@ -5429,13 +5429,13 @@ proc edit_prop {txtlabel} {
tkwait visibility .dialog
# select text after value= or lab= and place cursor just before selection
set regx {value *= *("[^"]+"|[^ \t\n"]+)} ;# vim syntax fix "
set regx {value *= *("([^"]|(\\"))+"|[^ \t\n"]+)} ;# vim syntax fix "
set regx1 {value *= *[^ \n]}
set idx [.dialog.symprop search -regexp -nolinestop -count nchars $regx 1.0]
.dialog.symprop search -regexp -nolinestop -count len $regx1 1.0
incr len -1
if {$idx eq {} } {
set regx {lab *= *("[^"]+"|[^ \t\n"]+)} ;# vim syntax fix "
set regx {lab *= *("([^"]|(\\"))+"|[^ \t\n"]+)} ;# vim syntax fix "
set regx1 {lab *= *[^ \n]}
set idx [.dialog.symprop search -regexp -nolinestop -count nchars $regx 1.0]
.dialog.symprop search -regexp -nolinestop -count len $regx1 1.0