mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
TMaskEdit: after deleting an extended selection, don't select a maskliteral. Reported in https://forum.lazarus.freepascal.org/index.php/topic,53557.0.html
git-svn-id: trunk@64744 -
This commit is contained in:
parent
9046b533af
commit
294a0a98c4
@ -1376,7 +1376,12 @@ procedure TCustomMaskEdit.DeleteChars(NextChar : Boolean);
|
||||
begin
|
||||
if NextChar then
|
||||
begin//VK_DELETE
|
||||
if HasSelection then DeleteSelected
|
||||
if HasSelection then
|
||||
begin
|
||||
DeleteSelected;
|
||||
if IsLiteral(FMask[FCursorPos]) then
|
||||
SelectNextChar;
|
||||
end
|
||||
else
|
||||
begin
|
||||
//cannot delete beyond length of string
|
||||
@ -1391,7 +1396,12 @@ begin
|
||||
else
|
||||
begin//VK_BACK
|
||||
//if selected text > 1 char then delete selection
|
||||
if HasExtSelection then DeleteSelected
|
||||
if HasExtSelection then
|
||||
begin
|
||||
DeleteSelected;
|
||||
if IsLiteral(FMask[FCursorPos]) then
|
||||
SelectNextChar;
|
||||
end
|
||||
else
|
||||
begin
|
||||
//cannot backspace if we are at beginning of string, or if all chars in front are MaskLiterals
|
||||
|
Loading…
Reference in New Issue
Block a user