mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Convert NSAttributedString to NSString in insertText:
git-svn-id: http://macvim.googlecode.com/svn/trunk@221 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -193,6 +193,12 @@ static float MMDragAreaSize = 73.0f;
|
||||
// TODO: Support 'mousehide' (check p_mh)
|
||||
[NSCursor setHiddenUntilMouseMoves:YES];
|
||||
|
||||
// NOTE: 'string' is either an NSString or an NSAttributedString. Since we
|
||||
// do not support attributes, simply pass the corresponding NSString in the
|
||||
// latter case.
|
||||
if ([string isKindOfClass:[NSAttributedString class]])
|
||||
string = [string string];
|
||||
|
||||
[[self vimController] sendMessage:InsertTextMsgID
|
||||
data:[string dataUsingEncoding:NSUTF8StringEncoding]
|
||||
wait:NO];
|
||||
|
||||
Reference in New Issue
Block a user