Update the selected range whenver the cursor position changes.

git-svn-id: http://macvim.googlecode.com/svn/trunk@208 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-27 18:07:16 +00:00
parent 277754b543
commit 19d29d252a
+8
View File
@@ -77,6 +77,14 @@ static float MMDragAreaSize = 73.0f;
insertionPointShape = shape;
insertionPointFraction = percent;
// Update the selected range so that the AppKit knows where the insertion
// point is. (The input manager sometimes likes to popup a window near the
// insertion point.)
MMTextStorage *ts = (MMTextStorage*)[self textStorage];
unsigned charIdx = [ts characterIndexForRow:insertionPointRow
column:insertionPointColumn];
[self setSelectedRange:NSMakeRange(charIdx,0)];
[self setInsertionPointColor:color];
}