From 03f166897801c29e9357bce3214f02502eb7f252 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 21 Jul 2012 12:37:00 -0400 Subject: Converted some `buffer` "get" and "set" functions into properties. Also updated to Scintilla 3.2.1. --- src/textadept.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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, -- cgit v1.2.3