mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
commit
b623295b0a
6 changed files with 20 additions and 9 deletions
|
|
@ -221,7 +221,6 @@
|
|||
Visibility="Visible">
|
||||
<TextBox.CommandBindings>
|
||||
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" />
|
||||
<CommandBinding Command="ApplicationCommands.Paste" Executed="OnPaste" />
|
||||
</TextBox.CommandBindings>
|
||||
<TextBox.ContextMenu>
|
||||
<ContextMenu MinWidth="160">
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ using ModernWpf.Controls;
|
|||
using Key = System.Windows.Input.Key;
|
||||
using System.Media;
|
||||
using static Flow.Launcher.ViewModel.SettingWindowViewModel;
|
||||
using DataObject = System.Windows.DataObject;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
@ -50,7 +51,8 @@ namespace Flow.Launcher
|
|||
_settings = settings;
|
||||
|
||||
InitializeComponent();
|
||||
InitializePosition();
|
||||
InitializePosition();
|
||||
DataObject.AddPastingHandler(QueryTextBox, OnPaste);
|
||||
}
|
||||
|
||||
public MainWindow()
|
||||
|
|
@ -72,12 +74,16 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
|
||||
private void OnPaste(object sender, ExecutedRoutedEventArgs e)
|
||||
private void OnPaste(object sender, DataObjectPastingEventArgs e)
|
||||
{
|
||||
if (System.Windows.Clipboard.ContainsText())
|
||||
var isText = e.SourceDataObject.GetDataPresent(System.Windows.DataFormats.UnicodeText, true);
|
||||
if (isText)
|
||||
{
|
||||
_viewModel.ChangeQueryText(System.Windows.Clipboard.GetText().Replace("\n", String.Empty).Replace("\r", String.Empty));
|
||||
e.Handled = true;
|
||||
var text = e.SourceDataObject.GetData(System.Windows.DataFormats.UnicodeText) as string;
|
||||
text = text.Replace(Environment.NewLine, " ");
|
||||
DataObject data = new DataObject();
|
||||
data.SetData(System.Windows.DataFormats.UnicodeText, text);
|
||||
e.DataObject = data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -259,6 +259,12 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
else if (!string.IsNullOrEmpty(SelectedResults.SelectedItem?.QuerySuggestionText))
|
||||
{
|
||||
var defaultSuggestion = SelectedResults.SelectedItem.QuerySuggestionText;
|
||||
// check if result.actionkeywordassigned is empty
|
||||
if (!string.IsNullOrEmpty(result.ActionKeywordAssigned))
|
||||
{
|
||||
autoCompleteText = $"{result.ActionKeywordAssigned} {defaultSuggestion}";
|
||||
}
|
||||
autoCompleteText = SelectedResults.SelectedItem.QuerySuggestionText;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
|||
{
|
||||
|
||||
// Reserved keywords in oleDB
|
||||
private static Regex _reservedPatternMatcher = new(@"[`\@\@\#\#\*\^,\&\&\/\\\$\%_;\[\]]+", RegexOptions.Compiled);
|
||||
private static Regex _reservedPatternMatcher = new(@"^[`\@\@\#\#\*\^,\&\&\/\\\$\%_;\[\]]+$", RegexOptions.Compiled);
|
||||
|
||||
private static async IAsyncEnumerable<SearchResult> ExecuteWindowsIndexSearchAsync(string indexQueryString, string connectionString, [EnumeratorCancellation] CancellationToken token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"Name": "Explorer",
|
||||
"Description": "Find and manage files and folders via Windows Search or Everything",
|
||||
"Author": "Jeremy Wu",
|
||||
"Version": "3.1.4",
|
||||
"Version": "3.1.5",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version: '1.17.0.{build}'
|
||||
version: '1.17.1.{build}'
|
||||
|
||||
init:
|
||||
- ps: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue