From 4aaaa72a088a94a939e68ef5f2412b76ab20ec9f Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Mon, 18 Nov 2024 18:07:23 +0100 Subject: [PATCH] Fix issue with beta AdvancedTextBox.cs - thx JDTR75 :) Fix #9018 --- src/ui/Controls/AdvancedTextBox.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/Controls/AdvancedTextBox.cs b/src/ui/Controls/AdvancedTextBox.cs index df4a91aeb..59c90e8a3 100644 --- a/src/ui/Controls/AdvancedTextBox.cs +++ b/src/ui/Controls/AdvancedTextBox.cs @@ -107,7 +107,7 @@ namespace Nikse.SubtitleEdit.Controls { args.SuppressKeyPress = true; } - else if (args.KeyData == Keys.Home && SelectionStart == 0 || (SelectionStart > 0 && Text[SelectionStart - 1] == '\n')) + else if (args.KeyData == Keys.Home && (SelectionStart == 0 || (SelectionStart > 0 && Text[SelectionStart - 1] == '\n'))) { args.SuppressKeyPress = true; } @@ -115,7 +115,7 @@ namespace Nikse.SubtitleEdit.Controls { args.SuppressKeyPress = true; } - else if (args.KeyData == Keys.End && SelectionStart >= Text.Length || (SelectionStart + 1 < Text.Length && Text[SelectionStart + 1] == '\n')) + else if (args.KeyData == Keys.End && (SelectionStart >= Text.Length || (SelectionStart + 1 < Text.Length && Text[SelectionStart + 1] == '\n'))) { args.SuppressKeyPress = true; }