Re: [Lazarus] syncro mode[Re: Auto indentation]

2009-11-04 Thread Martin
Mattias Gaertner wrote: On Wed, 04 Nov 2009 00:27:20 + Martin laza...@mfriebe.de wrote: Further thought about auto indent (for paste) and syncro/template mode. I disabled auto indent during syncro/template editing. you need the same for TSynPluginTemplateEdit (template edit,

Re: [Lazarus] syncro mode[Re: Auto indentation]

2009-11-04 Thread Martin
I just stumbled on the below if SrcEdit.EditorComponent.SelectionModesmNormal then exit; will not prevent the indent if an smColum mode block is inserted. The mode of the data inserted has nothing to do with the mode of the current block. And after the insert, there is no block, therefore it

Re: [Lazarus] syncro mode[Re: Auto indentation]

2009-11-04 Thread Martin
Martin wrote: Mattias Gaertner wrote: I guess this is the better solution for ecPaste. Can you add such an event? Yes, the question is, if it is ok for codetools, since it would be called before the paste = that is you have to interpret the to-be-pasted text before it is part of the source

[Lazarus] syncro mode[Re: Auto indentation]

2009-11-03 Thread Martin
Further thought about auto indent (for paste) and syncro/template mode. The only reliable position is the final caret pos (based on that you can do indent on return) - the line-range will be too big. - the inital caret position will be unusable. because the if any cell was above the caret