diff options
author | 2010-10-17 23:56:45 -0400 | |
---|---|---|
committer | 2010-10-17 23:56:45 -0400 | |
commit | b291fc4dc760ad90749a0692458e601b05906768 (patch) | |
tree | 954693826d19df6def77da9e3855b0ab69642b91 /src | |
parent | 7ed4ddf2301dca386a363087dc3f091731efb67d (diff) | |
download | textadept-b291fc4dc760ad90749a0692458e601b05906768.tar.gz textadept-b291fc4dc760ad90749a0692458e601b05906768.zip |
Do not allow gui.statusbar_text to be set to nil.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 97d7ca8f..8a996e70 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -25,7 +25,7 @@ lua_State *lua; int closing = FALSE; -const char *statusbar_text = 0; +const char *statusbar_text = ""; static int tVOID = 0, tINT = 1, tLENGTH = 2, /*tPOSITION = 3, tCOLOUR = 4,*/ tBOOL = 5, tKEYMOD = 6, tSTRING = 7, tSTRINGRESULT = 8; @@ -926,7 +926,7 @@ static int l_gui_mt_newindex(lua_State *lua) { else if (streq(key, "docstatusbar_text")) set_statusbar_text(lua_tostring(lua, 3), 1); else if (streq(key, "statusbar_text")) { - statusbar_text = lua_tostring(lua, 3); + statusbar_text = !lua_isnil(lua, 3) ? lua_tostring(lua, 3) : ""; set_statusbar_text(statusbar_text, 0); } else if (streq(key, "menubar")) { luaL_argcheck(lua, lua_istable(lua, 3), 3, "table of menus expected"); |