From 3dfdb995e1755353e188e09d2d8790761b2112eb Mon Sep 17 00:00:00 2001 From: XBB Date: Mon, 16 Dec 2024 19:36:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=89=A7=E6=9C=AC=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=BE=93=E5=85=A5=E4=B8=89=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Translate/Components/TranslateLineDialog.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SekaiToolsGUI/View/Translate/Components/TranslateLineDialog.xaml.cs b/SekaiToolsGUI/View/Translate/Components/TranslateLineDialog.xaml.cs index 3d32c36..7c614a8 100644 --- a/SekaiToolsGUI/View/Translate/Components/TranslateLineDialog.xaml.cs +++ b/SekaiToolsGUI/View/Translate/Components/TranslateLineDialog.xaml.cs @@ -32,7 +32,7 @@ private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) if (sender is not TextBox textBox) return; if (e.Key != Key.Enter) return; var lineCount = textBox.LineCount; - if (lineCount >= 2) e.Handled = true; // 阻止回车键输入新行 + if (lineCount >= 3) e.Handled = true; // 阻止回车键输入新行 } private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e) @@ -41,6 +41,6 @@ private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e) var newText = textBox.Text.Insert(textBox.CaretIndex, e.Text); var newLineCount = newText.Split('\n').Length; - if (newLineCount > 2) e.Handled = true; // 阻止输入导致超过三行 + if (newLineCount > 3) e.Handled = true; // 阻止输入导致超过三行 } } \ No newline at end of file