@jps @wbond it seems i need your help fixing my plugin. (https://github.com/vprimachenko/Sublime-Colorcoder/issues/65)
is there a way to change only the forground color via view.add_regions
? i have the following in my .sublime-color-scheme
{
"rules":
[
{ "scope": "string", "foreground": "green"}
]
}
now if i have a view with content like
foo "bar"
and i call
sublime.active_window().active_view().add_regions("test", [sublime.Region(0,3)], "string")
from the console i get the following result
which is rather not what i expect.
previously it was possible to change just the foreground by suplying a background
color in the scope settings, but now this hack no longer works.
the logic seems to be
if background present
use it to fill
else
use foreground to fill
so, how do i programatically change the foreground color of a region now?