mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 10:18:18 +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;
|
||||
|
||||
implementation
|
||||
uses SynEdit;
|
||||
|
||||
{ TSynCustomBeautifier }
|
||||
|
||||
@ -220,6 +221,8 @@ begin
|
||||
if (Command = ecDeleteLastChar) and
|
||||
(FAutoIndent) and
|
||||
(ACaret.CharPos > 1) and
|
||||
( (not TSynEdit(FCurrentEditor).SelAvail) or
|
||||
(eoPersistentBlock in TSynEdit(FCurrentEditor).Options2) ) and
|
||||
(GetCurrentIndent(FCurrentEditor, ACaret.LineText, True) = ACaret.CharPos - 1)
|
||||
then begin
|
||||
UnIndentLine(ACaret, x);
|
||||
|
Loading…
Reference in New Issue
Block a user