Browse Source

Fix crash when pressing deadkey while CC window is open.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5397 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
17d5510c03
  1. 5
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindowBase.cs

5
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindowBase.cs

@ -126,12 +126,17 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion
public override void OnPreviewKeyDown(KeyEventArgs e) public override void OnPreviewKeyDown(KeyEventArgs e)
{ {
// prevents crash when typing deadchar while CC window is open
if (e.DeadCharProcessedKey != Key.None)
return;
e.Handled = RaiseEventPair(window, PreviewKeyDownEvent, KeyDownEvent, e.Handled = RaiseEventPair(window, PreviewKeyDownEvent, KeyDownEvent,
new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key)); new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key));
} }
public override void OnPreviewKeyUp(KeyEventArgs e) public override void OnPreviewKeyUp(KeyEventArgs e)
{ {
if (e.DeadCharProcessedKey != Key.None)
return;
e.Handled = RaiseEventPair(window, PreviewKeyUpEvent, KeyUpEvent, e.Handled = RaiseEventPair(window, PreviewKeyUpEvent, KeyUpEvent,
new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key)); new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key));
} }

Loading…
Cancel
Save