aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2017-07-25 09:52:28 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2017-07-25 09:52:28 -0400
commit3eadc5a7912384ef404c9cfa2bcea0eba81f3a2c (patch)
treeaee6c1abf8fd19d6668723a472200b6a88bfe20b /src
parent26ab51f30386e75a579b7dd5386e2118eeeaf51a (diff)
downloadtextadept-3eadc5a7912384ef404c9cfa2bcea0eba81f3a2c.tar.gz
textadept-3eadc5a7912384ef404c9cfa2bcea0eba81f3a2c.zip
Properly handle `buffer.margin_left` and `buffer.margin_right`.
Scintilla's iface for them is different than similar properties.
Diffstat (limited to 'src')
-rw-r--r--src/textadept.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 58138abc..73fd9591 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1262,7 +1262,8 @@ static int lbuf_property(lua_State *L) {
int ltype = !newindex ? SVOID : l_rawgetiint(L, -1, 4);
int rtype = !newindex ? l_rawgetiint(L, -1, 3) : SVOID;
if (newindex &&
- (ltype != SVOID || wtype == SSTRING || wtype == SSTRINGRET)) {
+ (ltype != SVOID || wtype == SSTRING || wtype == SSTRINGRET ||
+ msg == SCI_SETMARGINLEFT || msg == SCI_SETMARGINRIGHT)) {
int temp = (wtype != SSTRINGRET) ? wtype : SSTRING;
wtype = ltype, ltype = temp;
}