comparison src/if_lua.c @ 12477:68d7bc045dbe v8.0.1118

patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs commit https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 16 20:54:51 2017 +0200 patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Sep 2017 21:00:06 +0200
parents 6c3d42d18366
children 972ea22c946f
comparison
equal deleted inserted replaced
12476:2516383741e6 12477:68d7bc045dbe
1176 luaV_pushbuffer(L, w->w_buffer); 1176 luaV_pushbuffer(L, w->w_buffer);
1177 else if (strncmp(s, "line", 4) == 0) 1177 else if (strncmp(s, "line", 4) == 0)
1178 lua_pushinteger(L, w->w_cursor.lnum); 1178 lua_pushinteger(L, w->w_cursor.lnum);
1179 else if (strncmp(s, "col", 3) == 0) 1179 else if (strncmp(s, "col", 3) == 0)
1180 lua_pushinteger(L, w->w_cursor.col + 1); 1180 lua_pushinteger(L, w->w_cursor.col + 1);
1181 #ifdef FEAT_WINDOWS
1182 else if (strncmp(s, "width", 5) == 0) 1181 else if (strncmp(s, "width", 5) == 0)
1183 lua_pushinteger(L, W_WIDTH(w)); 1182 lua_pushinteger(L, W_WIDTH(w));
1184 #endif
1185 else if (strncmp(s, "height", 6) == 0) 1183 else if (strncmp(s, "height", 6) == 0)
1186 lua_pushinteger(L, w->w_height); 1184 lua_pushinteger(L, w->w_height);
1187 /* methods */ 1185 /* methods */
1188 else if (strncmp(s, "next", 4) == 0 1186 else if (strncmp(s, "next", 4) == 0
1189 || strncmp(s, "previous", 8) == 0 1187 || strncmp(s, "previous", 8) == 0
1219 luaV_checksandbox(L); 1217 luaV_checksandbox(L);
1220 #endif 1218 #endif
1221 w->w_cursor.col = v - 1; 1219 w->w_cursor.col = v - 1;
1222 update_screen(VALID); 1220 update_screen(VALID);
1223 } 1221 }
1224 #ifdef FEAT_WINDOWS
1225 else if (strncmp(s, "width", 5) == 0) 1222 else if (strncmp(s, "width", 5) == 0)
1226 { 1223 {
1227 win_T *win = curwin; 1224 win_T *win = curwin;
1228 #ifdef FEAT_GUI 1225 #ifdef FEAT_GUI
1229 need_mouse_correct = TRUE; 1226 need_mouse_correct = TRUE;
1230 #endif 1227 #endif
1231 curwin = w; 1228 curwin = w;
1232 win_setwidth(v); 1229 win_setwidth(v);
1233 curwin = win; 1230 curwin = win;
1234 } 1231 }
1235 #endif
1236 else if (strncmp(s, "height", 6) == 0) 1232 else if (strncmp(s, "height", 6) == 0)
1237 { 1233 {
1238 win_T *win = curwin; 1234 win_T *win = curwin;
1239 #ifdef FEAT_GUI 1235 #ifdef FEAT_GUI
1240 need_mouse_correct = TRUE; 1236 need_mouse_correct = TRUE;