mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Minor improvements for spell check
This commit is contained in:
parent
097ec3f178
commit
f439be0fa3
@ -224,11 +224,19 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Utilities.ShowHelp("#spellcheck");
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G)
|
||||
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G)
|
||||
{
|
||||
e.SuppressKeyPress = true;
|
||||
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(textBoxWord.Text));
|
||||
}
|
||||
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
|
||||
{
|
||||
if (buttonUndo.Visible)
|
||||
{
|
||||
buttonUndo_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonAbortClick(object sender, EventArgs e)
|
||||
@ -911,9 +919,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
found = true;
|
||||
int endIndexPlus = indexStart + wordWithDashesOrPeriods.Length;
|
||||
bool startOk = indexStart == 0 || (" ['\"" + Environment.NewLine).Contains(text.Substring(indexStart - 1, 1));
|
||||
bool startOk = indexStart == 0 || (" (['\"" + Environment.NewLine).Contains(text.Substring(indexStart - 1, 1));
|
||||
bool endOk = endIndexPlus == text.Length;
|
||||
if (!endOk && endIndexPlus < text.Length && (",!?:;. ]").Contains(text.Substring(endIndexPlus, 1)))
|
||||
if (!endOk && endIndexPlus < text.Length && (",!?:;. ])<'\"").Contains(text.Substring(endIndexPlus, 1)))
|
||||
endOk = true;
|
||||
if (startOk && endOk)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user