Fix bugs in "Insert Unicode symbol"

This commit is contained in:
OmrSi 2020-10-01 22:57:08 +03:00
parent bf0a7c8e53
commit 1b4cae90a5

View File

@ -26759,9 +26759,15 @@ namespace Nikse.SubtitleEdit.Forms
else
{
if (textBoxListViewTextAlternate.Visible && textBoxListViewTextAlternate.Enabled && textBoxListViewTextAlternate.Focused)
{
if (!string.IsNullOrEmpty(textBoxListViewTextAlternate.SelectedText))
{
textBoxListViewTextAlternate.SelectedText = s;
textBoxListViewTextAlternate.Text = textBoxListViewTextAlternate.Text.Insert(textBoxListViewTextAlternate.SelectionStart, s);
}
else
{
textBoxListViewTextAlternate.Text = textBoxListViewTextAlternate.Text.Insert(textBoxListViewTextAlternate.SelectionStart, s + " ");
}
}
else
{
@ -26780,9 +26786,16 @@ namespace Nikse.SubtitleEdit.Forms
}
}
else
{
if (!string.IsNullOrEmpty(textBoxListViewText.SelectedText))
{
textBoxListViewText.SelectedText = s;
}
else
{
textBoxListViewText.Text = textBoxListViewText.Text.Insert(textBoxListViewText.SelectionStart, s + " ");
}
}
ShowSource();
RefreshSelectedParagraph();