mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
U+2028 and U+2029 render as squares instead of causing line break.
git-svn-id: http://macvim.googlecode.com/svn/trunk@222 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
- (int)maxRows;
|
||||
- (int)maxColumns;
|
||||
- (int)actualRows;
|
||||
- (int)actualColumns;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
- (void)setMaxRows:(int)rows columns:(int)cols;
|
||||
- (void)replaceString:(NSString *)string atRow:(int)row column:(int)col
|
||||
|
||||
@@ -143,6 +143,16 @@
|
||||
return maxColumns;
|
||||
}
|
||||
|
||||
- (int)actualRows
|
||||
{
|
||||
return actualRows;
|
||||
}
|
||||
|
||||
- (int)actualColumns
|
||||
{
|
||||
return actualColumns;
|
||||
}
|
||||
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols
|
||||
{
|
||||
if (rows) *rows = maxRows;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#import "MacVim.h"
|
||||
|
||||
|
||||
#define MM_USE_LINERANGE 0
|
||||
|
||||
|
||||
#if 0
|
||||
@interface MMTypesetter (Private)
|
||||
@@ -61,6 +63,7 @@
|
||||
unsigned i, numberOfLines = 0, firstLine = 0;
|
||||
NSRange firstLineRange = { 0, 0 };
|
||||
|
||||
#if MM_USE_LINERANGE
|
||||
// Find the first line and its range, and count the number of lines. (This
|
||||
// info could also be gleaned from MMTextStorage, but we do it here anyway
|
||||
// to make absolutely sure everything is right.)
|
||||
@@ -73,6 +76,14 @@
|
||||
|
||||
i = NSMaxRange(lineRange);
|
||||
}
|
||||
#else
|
||||
unsigned stride = 1 + [ts actualColumns];
|
||||
numberOfLines = [ts actualRows];
|
||||
firstLine = (unsigned)(startCharIdx/stride);
|
||||
firstLineRange.location = firstLine * stride;
|
||||
unsigned len = [text length] - firstLineRange.location;
|
||||
firstLineRange.length = len < stride ? len : stride;
|
||||
#endif
|
||||
|
||||
// Perform line fragment generation one line at a time.
|
||||
NSRange lineRange = firstLineRange;
|
||||
@@ -105,7 +116,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
#if MM_USE_LINERANGE
|
||||
lineRange = [text lineRangeForRange:NSMakeRange(endLineIdx, 0)];
|
||||
#else
|
||||
lineRange.location = endLineIdx;
|
||||
len = [text length] - lineRange.location;
|
||||
if (len < lineRange.length)
|
||||
lineRange.length = len;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (nextGlyph)
|
||||
|
||||
Reference in New Issue
Block a user