From debe292277bf91b3a03cde126fe3ad46e5d83165 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 5 Nov 2021 12:14:24 -0700 Subject: window:clear() --- src/lcurseslib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lcurseslib.c b/src/lcurseslib.c index 394cd84..5f2597e 100644 --- a/src/lcurseslib.c +++ b/src/lcurseslib.c @@ -102,10 +102,17 @@ static int Waddstr (lua_State *L) { } +static int Wclear (lua_State *L) { + lua_pushboolean(L, wclear(checkwin(L, 1))); + return 1; +} + + static const luaL_Reg curses_window_methods[] = { {"__tostring", W__tostring}, {"addstr", Waddstr}, + {"clear", Wclear}, {NULL, NULL} }; -- cgit 1.4.1-2-gfad0