Skip to content

Commit 8fb002d

Browse files
committed
Fix for #55
1 parent 35d3cf9 commit 8fb002d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Editor.pas

+5
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,11 @@ procedure TSynEditEx.CommandProcessor(Command: TSynEditorCommand; AChar: Char; D
22622262

22632263
inherited;
22642264

2265+
if SpaceCount2 > 0 then begin
2266+
//Lines[CaretY] := Copy(Lines[BackCounter], 1, SpaceCount2); // copy previous indent
2267+
if not (eoTabsToSpaces in Options) then
2268+
SpaceCount2 := SpaceCount2-(TabWidth-1); // Workaround to fix #55
2269+
end;
22652270
var Attr: TSynHighlighterAttributes;
22662271
if GetHighlighterAttriAtRowCol(BufferCoord(Length(Temp), CaretY - 1), Temp, Attr) then begin // only add indent to source files
22672272
if Attr <> Highlighter.CommentAttribute then begin // and outside of comments

0 commit comments

Comments
 (0)