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

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.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:
65
65
                                }
66
66
                        } else if (data.Caret.Line > DocumentLocation.MinLine) {
67
67
                                DocumentLine prevLine = data.Document.GetLine (data.Caret.Line - 1);
68
 
                                data.Caret.Location = new DocumentLocation (data.Caret.Line - 1, prevLine.Length + 1);
 
68
                                var nextLocation = new DocumentLocation (data.Caret.Line - 1, prevLine.Length + 1);
 
69
                                if (data.HasIndentationTracker && data.Options.IndentStyle == IndentStyle.Virtual && nextLocation.Column == DocumentLocation.MinColumn)
 
70
                                        nextLocation = new DocumentLocation (data.Caret.Line - 1, data.GetVirtualIndentationColumn (nextLocation));
 
71
                                data.Caret.Location = nextLocation;
69
72
                        }
70
73
                }
71
74