diff --git a/cre.cpp b/cre.cpp index 47998a13b..6b9e02ef7 100644 --- a/cre.cpp +++ b/cre.cpp @@ -408,9 +408,13 @@ static int setDefaultInterlineSpace(lua_State *L) { static int setStyleSheet(lua_State *L) { CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument"); - const char* style_sheet_data = luaL_checkstring(L, 2); + const char* style_sheet = luaL_checkstring(L, 2); + lString8 css; + + if (LVLoadStylesheetFile(lString16(style_sheet), css)){ + doc->text_view->setStyleSheet(css); + } - doc->text_view->setStyleSheet(lString8(style_sheet_data)); return 0; }