Several crash reports indicate failure to create a CFString (in ct::line_t’s constructor). As we have an explicit UTF-8 check, I am not sure why it would fail, but at least now TextMate should not crash when it happens.
ZWNJ is so common in Persian texts, and its unicode bi-direction class in neutral.
But the representation chunk contains latin characters and are so left-to-right.
So, when ZWNJ is replaced by the representation chunk, rtl texts are rendered incorrectly.
ZWJ and ZWSP are from the same class, but less common at least in Persian texts.
Previously we would fallback on the grammar’s folding patterns unless ‘foldingStartMarker’ was set, which meant setting just the stop marker or indented folding patterns, would be ignored.
The function will unfold anything completely within the range that also touches one of the range’s end points.
This is because the layout will show adjoining folded ranges as a single image, so if the user clicks this, it is unclear which of the ranges to actually unfold (the layout return a range that encompass all the adjoining folds).
Accessibility visual bounds for a range of a single softline should always
be also visually restricted to the softline. This is in order to be consistent
with implementation in Apple's apps (e.g. TextEdit).
This is only relevant for indented soft wrap where e.g. the text following the soft break is underlined: Previously we would then render an underline for the soft break node itself (which normally consists of whitespace).
Based on crash reports this appears to happen for some users, though only reason I can imagine is if the images are not found in the application bundle (which would happen if the application is moved after launch, but that normally cause many things to fail).
Ideally we would have the BundlesManager load the bundles but since tests don’t have their own framework requirements, this would require that the layout framework is setup to depend on the BundlesManager framework.
When enabled the height of the document is increased by the height of the view port, which means the last lines of the document are not anchored to the bottom of the view port but can e.g. be centered.
Closes#513.
Since styles_for_scope effectively ignore the font parameters (and instead return styles based on the font parameters used when the cache entry was created) it is a better design to have theme_t own the font. This way, changing it can do the proper cache invalidation.
A minor downside is that we can now change the font of the theme without also changing the layout’s font, which wouldn’t cause proper layout invalidation — since layout_t owns theme_t though, users of a layout should always change font via layout_t (which will then change it in the theme).
Also, themes cannot be shared between views that wish to use different font settings.
Given constraint-based layouts, we’re more likely to create views in code, and as helper functions are often involved, it makes sense to name them so that we can quickly get a list of all helpers (via search), either for copy/paste or for evaluating wether or not it makes sense to move all helpers to a single library.
Since helpers are declared with static storage, they do not pollute the global namespace.