Evaluated eval [wget https://dpaste.com/42YDYQULE.txt]
This commit is contained in:
committed by
dupa dup

parent
fdf2dfff87
commit
322c3fc022
21
procs/e59618b8fea2a2c6a44577eacfb5ecf791927487
Normal file
21
procs/e59618b8fea2a2c6a44577eacfb5ecf791927487
Normal file
@ -0,0 +1,21 @@
|
||||
{formatting {state {}}} {
|
||||
if {$state eq ""} {
|
||||
array set old [empty_formatting]
|
||||
} else {
|
||||
array set old $state
|
||||
}
|
||||
array set new $formatting
|
||||
if $old(o) {
|
||||
array set old [empty_formatting]
|
||||
}
|
||||
if $new(o) {
|
||||
return \017
|
||||
}
|
||||
set ret ""
|
||||
foreach k {b u r} {
|
||||
if {$old($k) != $new($k)} {
|
||||
append ret [string map {b \002 u \037 r \026} $k]
|
||||
}
|
||||
}
|
||||
return $ret[unparse_formatting_color [array get new] [array get old]]
|
||||
}
|
Reference in New Issue
Block a user