Merge pull request #6272 from OmrSi/autowrap-count-fix

Fix character count for auto-wrap
This commit is contained in:
Nikolaj Olsson 2022-09-21 01:10:56 -04:00 committed by GitHub
commit c4a8000147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -355,7 +355,7 @@ namespace Nikse.SubtitleEdit.Logic
return;
}
int length = HtmlUtil.RemoveHtmlTags(textBox.Text, true).Length;
var length = textBox.Text.CountCharacters(false);
if (e.Modifiers == Keys.None && e.KeyCode != Keys.Enter && length > Configuration.Settings.General.SubtitleLineMaximumLength)
{
string newText;