From 4272869093843168ff9647ed21337a5973cd2c6d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 19 Feb 2016 04:56:16 +0100 Subject: [PATCH] fix #17, ident after curly bracket auto-closing depending on options --- src/ce_synmemo.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 94497276..a5a83ccd 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -790,13 +790,13 @@ begin editor.CommandProcessor(ecDown, '', nil); editor.CommandProcessor(ecInsertLine, '', nil); editor.CommandProcessor(ecDown, '', nil); - editor.CommandProcessor(ecLineStart, '', nil); + while editor.CaretX <> 1 do editor.CommandProcessor(ecLeft, '' , nil); for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil); editor.CommandProcessor(ecChar, '}', nil); editor.CommandProcessor(ecUp, '', nil); - editor.CommandProcessor(ecLineStart, '', nil); for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil); editor.CommandProcessor(ecTab, '', nil); + while editor.CaretX > 1 + i + editor.TabWidth do editor.CommandProcessor(ecLeft, '' , nil); editor.EndUndoBlock; end;