Skip to content

Commit

Permalink
Avoid throwing exceptions in indentation tracker.
Browse files Browse the repository at this point in the history
  • Loading branch information
rojepp committed Feb 25, 2015
1 parent 4f75428 commit 97b12a6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ type FSharpIndentationTracker(doc:Document) =
let reIndent = column = text.Length + 1 && caretColumn = 1
if not reIndent then indentation else
let indent = getIndentation 0 (line.PreviousLine)
let initialWs = initialWhiteSpace text 0
if initialWs >= indent.Length then indentation else
indent.Substring(initialWhiteSpace text 0)

interface IIndentationTracker with
Expand Down

0 comments on commit 97b12a6

Please sign in to comment.