New text drawing model, better unicode support, 'gfw' support, etc.
Characters and columns are no longer assumed to be in one-to-one
correspondence. Thus when modifying the text storage a (row,column) pair must
be searched for. This is managed using
[NSString rangeOfComposedCharacterSequenceAtIndex:]
and by marking wide characters with an attribute (called "MMWideChar"). We
also provide an optimized code path for when characters and columns are in
one-to-one correspondence (no wide chars, only chars that can be represented by
one utf16 character).
A new typesetter is also used. Instead of overriding
layoutGlyphsInLayoutManager:::: we override willSetLineFragmentRect::::. This
typesetter can handle composing characters, whereas the old typesetter couldn't
(it can still be used by setting the user default "MMTypesetter" to
"MMTypesetter2".)
Note that text rendering still has flaws, the Cocoa Text System and Vim has
different opinions on how much space certain characters take up and this
results in display bugs. (E.g. nonspacing marks such as U+064C are
problematic.) Also, sometimes the layout manager hides glyphs but Vim assumes
that each character is displayed (resulting in yet more display bugs).
Added support for 'guifontwide'. This can be set to anything (different font
size); it is quite possible to set it so that the display becomes completely
messed up.
18 files changed: