File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,18 @@ public MainWindow()
4949 }
5050 private void OnCopy ( object sender , ExecutedRoutedEventArgs e )
5151 {
52- var results = _viewModel . Results ;
53- var result = results . SelectedItem ? . Result ;
54- if ( result != null ) // SelectedItem returns null if selection is empty.
52+ var _NewClipboard = QueryTextBox . SelectedText ;
53+ if ( QueryTextBox . SelectionLength == 0 )
5554 {
56-
57- System . Windows . Clipboard . SetDataObject ( result . Title . ToString ( ) ) ;
55+ var results = _viewModel . Results ;
56+ var result = results . SelectedItem ? . Result ;
57+ if ( result != null ) // SelectedItem returns null if selection is empty.
58+ {
59+ _NewClipboard = result . Title . ToString ( ) ;
60+ }
61+
5862 }
63+ System . Windows . Clipboard . SetDataObject ( _NewClipboard ) ;
5964 e . Handled = true ;
6065 }
6166 private async void OnClosing ( object sender , CancelEventArgs e )
You can’t perform that action at this time.
0 commit comments