~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/Caret.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
351
351
                        offsetVersion = doc.Version;
352
352
                }
353
353
 
354
 
                internal void UpdateCaretPosition ()
 
354
                internal void UpdateCaretPosition (DocumentChangeEventArgs e)
355
355
                {
 
356
                        if (e.AnchorMovementType == AnchorMovementType.BeforeInsertion && caretOffset == e.Offset) {
 
357
                                offsetVersion = TextEditorData.Version;
 
358
                                return;
 
359
                        }
356
360
                        var curVersion = TextEditorData.Version;
357
361
                        if (offsetVersion == null) {
358
362
                                offsetVersion = curVersion;
377
381
                                if (curLine != null && column > curLine.Length)
378
382
                                        newColumn = column;
379
383
                        }
380
 
 
381
384
                        line = newLocation.Line;
382
385
                        column = newColumn;
383
386