Open rchl opened 4 years ago
The underlines are also drawn in the wrong place in some circumstances and neither the link text nor the underline are clickable - tested on Xubuntu 19.04:
view.add_regions(key="tmp", regions=[view.sel()[0]], annotations=["<span>Hello World!</span><a href='subl://insert {\"characters\": \"hola!\"}'>⏹️</a>"], on_close=lambda: view.erase_regions("tmp"))
Semi-related painting issue: when changing the font-size (with ctrl+scrollwheel for example), the annotations don't reposition themselves horizontally.
There's also a paint fill issue it seems.
Run this in the ST console:
view.add_regions("asdf", regions=[view.sel()[0]], annotations=['<body><style>.x .y {background-color: color(var(--redish));}</style><div class="x"><span class="y">hello</span></div></body>'])
CSS:
.x .y {
background-color: color(var(--redish));
}
HTML:
<div class="x">
<span class="y">
hello
</span>
</div>
It appears that the initial issue is resolved in 4079 (it might need more testing on various platforms though).
I haven't encountered painting issues for a while now.
Your example above still seems to have issues.
Description
In ST4 it's possible to add special annotations through a
view.add_regions
call. If that annotation contains a link then the bottom part of the link (the underline) is not painted correctly.Steps to reproduce
Expected behavior
Actual behavior
The underline rendering is spotty.
Environment