Themes combining indenting and background highlights sometimes glitch
CompletedThemes which combine indenting with a background highlight will sometimes draw the highlight beyond the indent range. I’d attach some sample files here to make this easier, but I don’t see a way of doing so:
1. Duplicate the “Empty.theme” in the theme folder to create a test.
2. Modify the codeBlock array to:
```
"codeBlock" : {
"fontName" : "Courier",
"fontScale" : 0.92,
"backgroundColor" : "ff0000",
"leftIndent" : 30.0
},
```
3. Save and use the View ▸ Theme ▸ Empty copy theme.
At this point, create a new note with some junk text, and add a fenced code block somewhere. The best way to observe this is just type in a few words on each line. It doesn’t need to be “code”, I just typed a few words on each line.
What you’re looking for are flickering appearances of the bright red background colour beyond the leftIndent for that text block. They will come and go even as you key in letters on a line.
While you’re there, note that tabbed content does not play especially well with indented formatting. Looks to me a lot like what the text engine does if there are insufficient tab stops on a line. This seems to impact any block with indent added—I ran into the same issue with unordered lists, where nested sublists (with a tab prefix on the line) broke the formatting.
-
Tab issue is fixed.
Working on background color.
0 -
The background color issue seems to be a problem with macOS. I can replicate this in TextEdit by assigning a background color to text, setting a head indent and first line indent, and then typing away. Not sure I can do anything about that.
0 -
Yikes! And yeah, not surprising either. :) I don't think the text engine used to do that---the weird stuff with highlights popping out of the indent, yeah, but the flickering while typing seems new to me.
0
Please sign in to leave a comment.
Comments
3 comments