[Pkg-cli-apps-commits] [fsharp] 27/60: Fix for: Issue 899333 [Watson] clr20r3: CLR_EXCEPTION_SYSTEM.IO.FILENOTFOUNDEXCEPTION_80070002_FSharp.Editor.dll!Microsoft.VisualStudio.FSharp.Editor.SmartIndent.Microsoft-VisualStudio-Text-Editor-ISmartIndent-GetDesiredIndentation Bug Lincoln Atkinson Active
Christopher Halse Rogers
raof-guest at moszumanska.debian.org
Sun Sep 14 08:13:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
raof-guest pushed a commit to branch master
in repository fsharp.
commit 94ea6fb0baee144bb35742360be4f660598fb61d
Author: KevinRansom <kevinr at microsoft.com>
Date: Fri Jul 25 12:21:47 2014 -0700
Fix for: Issue 899333
[Watson] clr20r3: CLR_EXCEPTION_SYSTEM.IO.FILENOTFOUNDEXCEPTION_80070002_FSharp.Editor.dll!Microsoft.VisualStudio.FSharp.Editor.SmartIndent.Microsoft-VisualStudio-Text-Editor-ISmartIndent-GetDesiredIndentation Bug Lincoln Atkinson Active
if textManager.GetUserPreferences returns an error that error will be translated to an exception, always. The fix is to default the value if an error occurs, otherwis use the value retrieved from preferences.
(changeset 1305824)
---
vsintegration/src/vs/FsPkgs/FSharp.Editor/SmartIndent.fs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vsintegration/src/vs/FsPkgs/FSharp.Editor/SmartIndent.fs b/vsintegration/src/vs/FsPkgs/FSharp.Editor/SmartIndent.fs
index c3b13b6..92d3d34 100644
--- a/vsintegration/src/vs/FsPkgs/FSharp.Editor/SmartIndent.fs
+++ b/vsintegration/src/vs/FsPkgs/FSharp.Editor/SmartIndent.fs
@@ -50,9 +50,9 @@ type SmartIndent (textView : ITextView, textManager : IVsTextManager) =
member this.GetDesiredIndentation(line : ITextSnapshotLine) =
let lp = [| LANGPREFERENCES(guidLang = Guid(FSharpCommonConstants.languageServiceGuidString)) |]
- ErrorHandler.ThrowOnFailure(textManager.GetUserPreferences(null, null, lp, null)) |> ignore
+ let indentStyle = if ErrorHandler.Succeeded(textManager.GetUserPreferences(null, null, lp, null)) then lp.[0].IndentStyle else vsIndentStyle.vsIndentStyleDefault
- if (lp.[0].IndentStyle = vsIndentStyle.vsIndentStyleNone || _textView = null || _textView.IsClosed) then
+ if (indentStyle = vsIndentStyle.vsIndentStyleNone || _textView = null || _textView.IsClosed) then
Nullable<int>()
else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git
More information about the Pkg-cli-apps-commits
mailing list