Fix character count for auto-wrap

This commit is contained in:
OmrSi 2022-09-21 01:38:34 +03:00
parent 7c02cd1fd4
commit fad6ea69c7

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;