From 6c7a9a492cfb201223bb0890b304ec189dab8600 Mon Sep 17 00:00:00 2001 From: Ahmet Sait Date: Fri, 12 Jul 2024 10:39:35 +0300 Subject: [PATCH] [TestApp] Simplify redo command --- Scintilla.NET.TestApp/FormMain.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Scintilla.NET.TestApp/FormMain.cs b/Scintilla.NET.TestApp/FormMain.cs index d2cb6d6..3ffc68b 100644 --- a/Scintilla.NET.TestApp/FormMain.cs +++ b/Scintilla.NET.TestApp/FormMain.cs @@ -37,6 +37,8 @@ public FormMain() baseTitle = this.Text; + scintilla.AssignCmdKey(Keys.Control | Keys.Shift | Keys.Z, Command.Redo); + scintilla.LexerName = "cpp"; SetScintillaStyles(scintilla); @@ -221,16 +223,6 @@ private void describeKeywordSetsToolStripMenuItem_Click(object sender, EventArgs scintilla.ReplaceSelection(scintilla.DescribeKeywordSets()); } - private void scintilla_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyData == (Keys.Control | Keys.Shift | Keys.Z)) - { - scintilla.Redo(); - e.Handled = true; - e.SuppressKeyPress = true; - } - } - private void scintilla_TextChanged(object sender, EventArgs e) { AdjustLineNumberMargin(scintilla);