Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac32717

Browse files
dungpalatkin
authored andcommitted
Alt + Enter sends current line to FSI if there is no selection
fixesdotnet#256closesdotnet#257commit9388cbbAuthor: Anh-Dung Phan <phananhdung309@yahoo.com>Date: Fri Feb 20 21:53:51 2015 +0000 Remove an unused variablecommit4ad5026Author: Anh-Dung Phan <phananhdung309@yahoo.com>Date: Fri Feb 20 19:41:24 2015 +0000 Alt + Enter sends current line to FSI if there is no selection
1 parent3faba92 commitac32717

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

‎vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/ViewFilter.cs‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,7 @@ protected virtual int QueryCommandStatus(ref Guid guidCmdGroup, uint nCmdId) {
421421
{
422422
if(nCmdId==(uint)Microsoft.VisualStudio.VSConstants.VSStd11CmdID.ExecuteSelectionInInteractive)
423423
{
424-
stringselection;
425-
this.textView.GetSelectedText(outselection);
426-
if(selection=="")
427-
return(int)OLECMDF.OLECMDF_SUPPORTED;
428-
else
429-
return(int)OLECMDF.OLECMDF_SUPPORTED|(int)OLECMDF.OLECMDF_ENABLED;
424+
return(int)OLECMDF.OLECMDF_SUPPORTED|(int)OLECMDF.OLECMDF_ENABLED;
430425
}
431426
elseif(nCmdId==(uint)Microsoft.VisualStudio.VSConstants.VSStd11CmdID.ExecuteLineInInteractive)
432427
{

‎vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/fsiPackageHooks.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module internal Hooks =
113113

114114
command.Supported<-true
115115
command.Visible<- looksLikeFSharp
116-
command.Enabled<-if selectLinethentrueelse haveSelection
116+
command.Enabled<-true
117117

118118
let mutableprivatehasBeenInitialized=false
119119

‎vsintegration/src/vs/FsPkgs/FSharp.VS.FSI/fsiSessionToolWindow.fs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -454,17 +454,17 @@ type internal FsiToolWindow() as this =
454454
// Change post CTP.
455455
letdte= provider.GetService(typeof<DTE>):?> DTE
456456
letactiveD= dte.ActiveDocument
457-
match dte.ActiveDocument.Selectionwith
457+
match activeD.Selectionwith
458+
|:? TextSelectionas selectionwhen selectLine|| selection.Text=""->
459+
selection.SelectLine()
460+
showNoActivate()
461+
executeInteraction(System.IO.Path.GetDirectoryName(activeD.FullName)) activeD.FullName selection.TopLine selection.Text
462+
// This has the effect of moving the line and de-selecting it.
463+
selection.LineDown(false,0)
464+
selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn,false)
458465
|:? TextSelectionas selection->
459-
letorigLine= selection.CurrentLine
460-
if selectLinethen
461-
selection.SelectLine()
462466
showNoActivate()
463467
executeInteraction(System.IO.Path.GetDirectoryName(activeD.FullName)) activeD.FullName selection.TopLine selection.Text
464-
if selectLinethen
465-
// This has the effect of moving the line and de-selecting it.
466-
selection.LineDown(false,0)
467-
selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn,false)
468468
|_->
469469
()
470470
with

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp