diff --git a/Makefile b/Makefile index 97adf0d..7b7d4cb 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,8 @@ CONFIG_LUA ?= 1 CONFIG_ACL ?= 0 CONFIG_SELINUX ?= 0 -CFLAGS_STD ?= -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG -LDFLAGS_STD ?= -lc +CFLAGS_STD ?= -std=c99 -D_DARWIN_C_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG +LDFLAGS_STD ?= -lc -llua -lncurses -ltermkey CFLAGS_VIS = $(CFLAGS_AUTO) $(CFLAGS_TERMKEY) $(CFLAGS_CURSES) $(CFLAGS_ACL) \ $(CFLAGS_SELINUX) $(CFLAGS_LUA) $(CFLAGS_STD) diff --git a/view.c b/view.c index 0dd185a..8cdc31a 100644 --- a/view.c +++ b/view.c @@ -160,7 +160,7 @@ static void view_syntax_color(View *view) { int token_count; if (lua_isfunction(L, -4) && !lua_pcall(L, 3, 1, 0) && lua_istable(L, -1) && - (token_count = lua_objlen(L, -1)) > 0) { + (token_count = lua_rawlen(L, -1)) > 0) { size_t pos = lexer_before - (lex_text - text); Line *line = view->topline;