Skip to content

Commit

Permalink
Fixes #5 - SWQL Studio fails to execute selected text as a query
Browse files Browse the repository at this point in the history
  • Loading branch information
tdanner committed Jul 27, 2015
1 parent e49465c commit d5c6af8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Src/SwqlStudio/SciTextEditorControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ public SciTextEditorControl()

public string GetSelectedOrAllText()
{
return Selections.IsEmpty ? Text : Selections[0].ToString();
var text = SelectedText;
if (string.IsNullOrEmpty(text))
text = Text;
return text;
}

protected override void OnKeyPress(KeyPressEventArgs e)
Expand Down

0 comments on commit d5c6af8

Please sign in to comment.