mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user