From 712b9853334e705ecc29821db87be1f32addd105 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 23 Dec 2024 00:51:52 +0100 Subject: [PATCH] proc edit_prop: better selection of value=".... \" .... \" ...": dont get confused by escaped quotes --- src/xschem.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index ad33ab2d..ab80b886 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -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