Here is a simple test script to run in SciTE
print("Left " .. editor.MarginLeft)
editor.MarginLeft = 12
print("Left " .. editor.MarginLeft)
print("Right " .. editor.MarginRight)
editor.MarginRight = 12
print("Right " .. editor.MarginRight)
Both the margins are 1 (which is the default value) and then after being set, their values are 0. Visully you can also tell the left margin changes from 1 to 0.
It appears it is due to the way they are defined in IFaceTable.cxx. They are:
{"MarginLeft", 2156, 2155, iface_int, iface_void}
{"MarginRight", 2158, 2157, iface_int, iface_void}
However they actually defined as taking "<unused>, int pixels". These seem to be the only properties that carry their values in the 2nd parameter rather than the first.
Reversing the order in the IFaceTable entry is not sufficient to fix this. Support would have to be added for properties that use lParam for setting. Since 3 of the 4 margins can be set with the *blank.margin* properties, this is a low priority issue.
Yeah it's a bit of a corner case, so not a big deal