From 61397045683385487eca53a58905e21a7d71fba1 Mon Sep 17 00:00:00 2001 From: "bjorn.winckler" Date: Mon, 27 Aug 2007 18:07:16 +0000 Subject: [PATCH] Update the selected range whenver the cursor position changes. git-svn-id: http://macvim.googlecode.com/svn/trunk@208 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMTextView.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MMTextView.m b/MMTextView.m index 2ff09227..931e752b 100644 --- a/MMTextView.m +++ b/MMTextView.m @@ -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]; } -- 2.11.4.GIT