From 54063119ec6222bafb9f1409aee31d8e24861532 Mon Sep 17 00:00:00 2001 From: Vlad Zarytokvsii Date: Mon, 3 May 2021 14:32:10 +0200 Subject: [PATCH 1/2] Fix the left arrow guard for F# interactive. --- vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs index d5b9dd93cd..1f33f857f1 100644 --- a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs +++ b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs @@ -339,7 +339,7 @@ type internal FsiToolWindow() as this = let supportWhenAtStartOfInputArea (sender:obj) (e:EventArgs) = let command = sender :?> MenuCommand if command <> null then - command.Supported <- not source.IsCompletorActive && isCurrentPositionInInputArea() + command.Supported <- not source.IsCompletorActive && isCurrentPositionAtStartOfInputArea() /// Support when at the start of the input area AND no-selection (e.g. to enable NoAction on BACKSPACE). let supportWhenAtStartOfInputAreaAndNoSelection (sender:obj) (e:EventArgs) = @@ -375,7 +375,8 @@ type internal FsiToolWindow() as this = textView.SetSelection(line, endColumn, line, startColumn) |> throwOnFailure0 /// Hanlde no-op, used to overwrite some standard command with an empty action. - let onNoAction (sender:obj) (e:EventArgs) = () + let onNoAction (sender:obj) (e:EventArgs) = + () /// Handle "Clear Pane". Clear input and all but the last ReadOnly line (probably the prompt). @@ -675,7 +676,7 @@ type internal FsiToolWindow() as this = else new OleMenuCommandService(this, originalFilter) - let addCommand guid cmdId handler guard= + let addCommand guid cmdId handler guard = let id = new CommandID(guid,cmdId) let cmd = new OleMenuCommand(new EventHandler(handler),id) match guard with From a2611676737d3e63f219b3397ba3247cbe34b13e Mon Sep 17 00:00:00 2001 From: Vlad Zarytokvsii Date: Mon, 3 May 2021 14:34:20 +0200 Subject: [PATCH 2/2] Fixed some minor styling --- vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs index 1f33f857f1..61ff177fd3 100644 --- a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs +++ b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs @@ -375,8 +375,7 @@ type internal FsiToolWindow() as this = textView.SetSelection(line, endColumn, line, startColumn) |> throwOnFailure0 /// Hanlde no-op, used to overwrite some standard command with an empty action. - let onNoAction (sender:obj) (e:EventArgs) = - () + let onNoAction (sender:obj) (e:EventArgs) = () /// Handle "Clear Pane". Clear input and all but the last ReadOnly line (probably the prompt).