Skip to content

Commit 27b1362

Browse files
committed
fix: Ctrl+F in FastColoredTextBox no longer hijacked by TreeView filter (#873)
1 parent 30896ff commit 27b1362

2 files changed

Lines changed: 11 additions & 61 deletions

File tree

.github/workflows/claude.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/ServiceBusExplorer/Forms/MainForm.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7748,13 +7748,24 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
77487748
{
77497749
if (keyData == (Keys.Control | Keys.F))
77507750
{
7751+
if (GetFocusedControl(this) is FastColoredTextBoxNS.FastColoredTextBox)
7752+
{
7753+
return base.ProcessCmdKey(ref msg, keyData);
7754+
}
77517755
filterTreeViewTextBox.Focus();
77527756
filterTreeViewTextBox.SelectAll();
77537757
return true;
77547758
}
77557759
return base.ProcessCmdKey(ref msg, keyData);
77567760
}
77577761

7762+
private static Control GetFocusedControl(Control control)
7763+
{
7764+
if (control is ContainerControl cc && cc.ActiveControl != null)
7765+
return GetFocusedControl(cc.ActiveControl);
7766+
return control;
7767+
}
7768+
77587769
#endregion
77597770

77607771
#region TreeView Filter

0 commit comments

Comments
 (0)