diff options
author | 2012-07-21 12:37:00 -0400 | |
---|---|---|
committer | 2012-07-21 12:37:00 -0400 | |
commit | 03f166897801c29e9357bce3214f02502eb7f252 (patch) | |
tree | 4066fae87259848d7d488bd39871964f6fd510fa /src/textadept.c | |
parent | 5a50a7e55b870ae66a6bb69fcd3a7bd1841f3d9b (diff) | |
download | textadept-03f166897801c29e9357bce3214f02502eb7f252.tar.gz textadept-03f166897801c29e9357bce3214f02502eb7f252.zip |
Converted some `buffer` "get" and "set" functions into properties.
Also updated to Scintilla 3.2.1.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/textadept.c b/src/textadept.c index 59d05e80..80407428 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -881,7 +881,7 @@ static int lgui_menu(lua_State *L) { #if GTK l_pushmenu(L, -1, G_CALLBACK(m_clicked), FALSE); #elif NCURSES - // TODO: create menu and manage memory. + luaL_error(L, "not implemented in this environment"); #endif return 1; } @@ -1247,8 +1247,9 @@ static int lbuf_property(lua_State *L) { int wtype = l_rawgetiint(L, -1, !newindex ? 4 : 3); int ltype = !newindex ? tVOID : l_rawgetiint(L, -1, 4); int rtype = !newindex ? l_rawgetiint(L, -1, 3) : tVOID; - if (newindex && (ltype != tVOID || wtype == tSTRING)) { - int temp = wtype; + if (newindex && + (ltype != tVOID || wtype == tSTRING || wtype == tSTRINGRESULT)) { + int temp = (wtype != tSTRINGRESULT) ? wtype : tSTRING; wtype = ltype, ltype = temp; } luaL_argcheck(L, msg != 0, !newindex ? 2 : 3, |