mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-27 07:28:25 +02:00
SynEdit: Prevent auto-unindent (on backspace) if a selection exists. Selection must be deleted instead.
git-svn-id: trunk@21681 -
This commit is contained in:
parent
732549fe81
commit
50b14ade3c
@ -146,6 +146,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
uses SynEdit;
|
||||||
|
|
||||||
{ TSynCustomBeautifier }
|
{ TSynCustomBeautifier }
|
||||||
|
|
||||||
@ -220,6 +221,8 @@ begin
|
|||||||
if (Command = ecDeleteLastChar) and
|
if (Command = ecDeleteLastChar) and
|
||||||
(FAutoIndent) and
|
(FAutoIndent) and
|
||||||
(ACaret.CharPos > 1) and
|
(ACaret.CharPos > 1) and
|
||||||
|
( (not TSynEdit(FCurrentEditor).SelAvail) or
|
||||||
|
(eoPersistentBlock in TSynEdit(FCurrentEditor).Options2) ) and
|
||||||
(GetCurrentIndent(FCurrentEditor, ACaret.LineText, True) = ACaret.CharPos - 1)
|
(GetCurrentIndent(FCurrentEditor, ACaret.LineText, True) = ACaret.CharPos - 1)
|
||||||
then begin
|
then begin
|
||||||
UnIndentLine(ACaret, x);
|
UnIndentLine(ACaret, x);
|
||||||
|
Loading…
Reference in New Issue
Block a user