mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Draw invisible chars only for control characters (fix #962)
This commit is contained in:
parent
8e4e9ab694
commit
898ec66d40
10
CHANGELOG.md
10
CHANGELOG.md
@ -2,6 +2,16 @@
|
||||
Change Log
|
||||
==========================
|
||||
|
||||
3.7.6 (unreleased)
|
||||
--------------------------
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue where an unwanted whitespace was added for variation selector `U+FE0E` when control characters are visible.
|
||||
|
||||
|
||||
|
||||
|
||||
3.7.5 (353)
|
||||
--------------------------
|
||||
|
||||
|
@ -55,7 +55,8 @@ final class ATSTypesetter: NSATSTypesetter {
|
||||
|
||||
if action.contains(.zeroAdvancementAction),
|
||||
let character = (self.attributedString?.string as NSString?)?.character(at: charIndex),
|
||||
!UTF16.isTrailSurrogate(character) // ignore one of surrogate
|
||||
let unicode = Unicode.Scalar(character),
|
||||
unicode.properties.generalCategory == .control
|
||||
{
|
||||
return .whitespaceAction // -> Then, the glyph width can be modified on `boundingBox(forControlGlyphAt:...)`.
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user