mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 11:42:36 +01:00
Fixes off-by-one error
Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
This commit is contained in:
parent
6f85a19f00
commit
66ac99755c
@ -107,7 +107,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
{
|
{
|
||||||
args.SuppressKeyPress = true;
|
args.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (args.KeyData == Keys.Home && (SelectionStart == 0 || SelectionStart > 0 && Text[SelectionStart - 1] == '\n'))
|
else if (args.KeyData == Keys.Home && SelectionStart == 0 || (SelectionStart > 0 && Text[SelectionStart - 1] == '\n'))
|
||||||
{
|
{
|
||||||
args.SuppressKeyPress = true;
|
args.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
{
|
{
|
||||||
args.SuppressKeyPress = true;
|
args.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
else if (args.KeyData == Keys.End && (SelectionStart >= Text.Length || SelectionStart + 1 < Text.Length && Text[SelectionStart + 1] == '\n'))
|
else if (args.KeyData == Keys.End && SelectionStart >= Text.Length || (SelectionStart + 1 < Text.Length && Text[SelectionStart + 1] == '\n'))
|
||||||
{
|
{
|
||||||
args.SuppressKeyPress = true;
|
args.SuppressKeyPress = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user