2009/6/18 björn: > 2009/6/10 vany: >> >> Drag&drop a file (with wide-chars in its filename) to MacVim, >> then MacVim gets into trouble like a zombie with these error outputs >> in Console. >> ---------------- >> MacVim[2779] [processInputQueue:] Caught exception (pid=2801): The >> index 1943 is invalid >> MacVim[2779] !!! _NSLayoutTreeLineFragmentRectForGlyphAtIndex invalid >> glyph index 1942 >> MacVim[2779] Exception raised while text storage 0x1b35d0 was >> responding to font set changed notification: *** NSRunStorage, >> _NSBlockNumberForIndex(): index (1942) beyond array bounds (0) >> ---------------- >> >> I made a sample txt file 'Han.txt', and then made a hardlink-copy of >> it named '한.txt'. (ln Han.txt 한.txt) >> With 'Han.txt' drag&drop file-opening works good, but with '한.txt' it >> doesn't work. >> However.. in an already-opened MacVim window, ":e 한.txt" works good. > > Thanks for the report -- I can reproduce this bug so it shouldn't be > too hard to fix. I'll report back when I have a fix.
It turns out that it is very hard to fix this problem and for now I can not see a way to fix this. The only workaround I can suggest is to use the ATSUI renderer instead (select it in Advanced prefs and open a new window). The problem has to do with "composing" characters (I don't know if this is the right terminology in this case). Vim thinks that 한 is three glyphs "ᄒ", "ᅡ", and "ᆫ" but the Cocoa text system "merges" this into the one glyph "한". No matter how hard I try to "fix" this it will always lead to display problems, although at the moment it is a bit worse in that the code actually raises an exception (and eventually crashes). This problem is not present if you use the ATSUI renderer but it will render the above as three glyphs no matter what (and short of going in and fixing this in core Vim I can't do anything about that). I'm afraid I know way too little about text rendering to fix this, so until somebody else fixes it in core Vim the problem will remain. I would highly suggest that you take up the rendering problem on the vim_dev mailing list (just send a text file with 한 as the content and ask why it renders as three glyphs). Sorry, Björn --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_mac" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
