Merge pull request #4404 from OmrSi/insert-unicode-fix

Fix bugs in "Insert Unicode symbol"
This commit is contained in:
Nikolaj Olsson 2020-10-03 09:27:29 +02:00 committed by GitHub
commit faaa3ad15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26831,8 +26831,14 @@ namespace Nikse.SubtitleEdit.Forms
{
if (textBoxListViewTextAlternate.Visible && textBoxListViewTextAlternate.Enabled && textBoxListViewTextAlternate.Focused)
{
textBoxListViewTextAlternate.SelectedText = s;
textBoxListViewTextAlternate.Text = textBoxListViewTextAlternate.Text.Insert(textBoxListViewTextAlternate.SelectionStart, s);
if (!string.IsNullOrEmpty(textBoxListViewTextAlternate.SelectedText))
{
textBoxListViewTextAlternate.SelectedText = s;
}
else
{
textBoxListViewTextAlternate.Text = textBoxListViewTextAlternate.Text.Insert(textBoxListViewTextAlternate.SelectionStart, s + " ");
}
}
else
{
@ -26852,7 +26858,14 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
textBoxListViewText.SelectedText = s;
if (!string.IsNullOrEmpty(textBoxListViewText.SelectedText))
{
textBoxListViewText.SelectedText = s;
}
else
{
textBoxListViewText.Text = textBoxListViewText.Text.Insert(textBoxListViewText.SelectionStart, s + " ");
}
}
ShowSource();