#9427

gning
Participant

Bringing back an old issue here… this problem is not fixed in 10.0.8 (x64). Here is my latest attempt at a macro to indent by one space… note that it tries to force the editor into indent-with-spaces-only mode:

var icfg = Document.Config.Indent;
var oldIC = icfg.IndentColumns;
var oldTC = icfg.TabColumns;
var oldIS = icfg.InsertSpaces;
icfg.IndentColumns = icfg.TabColumns = 1;
icfg.InsertSpaces = true;
Document.Config.Save();
Editor.ExecuteCommandByID(4358); // indent (as with Tab key)
icfg.IndentColumns = oldIC;
icfg.TabColumns = oldTC;
icfg.InsertSpaces = oldIS;
Document.Config.Save();

With alerts, I have verified that the values of the column properties do change to 1… but the indent I end up with is still a tab character, not a space. Exactly as if I had just pressed the tab key without changing any settings.