comparison src/mark.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 d4ffc3dc9fb0
children ac42c4b11dbc
comparison
equal deleted inserted replaced
12476:2516383741e6 12477:68d7bc045dbe
1054 { 1054 {
1055 int i; 1055 int i;
1056 int fnum = curbuf->b_fnum; 1056 int fnum = curbuf->b_fnum;
1057 linenr_T *lp; 1057 linenr_T *lp;
1058 win_T *win; 1058 win_T *win;
1059 #ifdef FEAT_WINDOWS
1060 tabpage_T *tab; 1059 tabpage_T *tab;
1061 #endif
1062 static pos_T initpos = INIT_POS_T(1, 0, 0); 1060 static pos_T initpos = INIT_POS_T(1, 0, 0);
1063 1061
1064 if (line2 < line1 && amount_after == 0L) /* nothing to do */ 1062 if (line2 < line1 && amount_after == 0L) /* nothing to do */
1065 return; 1063 return;
1066 1064
1338 if (curwin->w_jumplistidx == curwin->w_jumplistlen) 1336 if (curwin->w_jumplistidx == curwin->w_jumplistlen)
1339 curwin->w_jumplistidx = to; 1337 curwin->w_jumplistidx = to;
1340 curwin->w_jumplistlen = to; 1338 curwin->w_jumplistlen = to;
1341 } 1339 }
1342 1340
1343 # if defined(FEAT_WINDOWS) || defined(PROTO)
1344 /* 1341 /*
1345 * Copy the jumplist from window "from" to window "to". 1342 * Copy the jumplist from window "from" to window "to".
1346 */ 1343 */
1347 void 1344 void
1348 copy_jumplist(win_T *from, win_T *to) 1345 copy_jumplist(win_T *from, win_T *to)
1368 int i; 1365 int i;
1369 1366
1370 for (i = 0; i < wp->w_jumplistlen; ++i) 1367 for (i = 0; i < wp->w_jumplistlen; ++i)
1371 vim_free(wp->w_jumplist[i].fname); 1368 vim_free(wp->w_jumplist[i].fname);
1372 } 1369 }
1373 # endif
1374 #endif /* FEAT_JUMPLIST */ 1370 #endif /* FEAT_JUMPLIST */
1375 1371
1376 void 1372 void
1377 set_last_cursor(win_T *win) 1373 set_last_cursor(win_T *win)
1378 { 1374 {
1893 write_viminfo_marks(FILE *fp_out, garray_T *buflist) 1889 write_viminfo_marks(FILE *fp_out, garray_T *buflist)
1894 { 1890 {
1895 buf_T *buf; 1891 buf_T *buf;
1896 int is_mark_set; 1892 int is_mark_set;
1897 int i; 1893 int i;
1898 #ifdef FEAT_WINDOWS
1899 win_T *win; 1894 win_T *win;
1900 tabpage_T *tp; 1895 tabpage_T *tp;
1901 1896
1902 /* 1897 /*
1903 * Set b_last_cursor for the all buffers that have a window. 1898 * Set b_last_cursor for the all buffers that have a window.
1904 */ 1899 */
1905 FOR_ALL_TAB_WINDOWS(tp, win) 1900 FOR_ALL_TAB_WINDOWS(tp, win)
1906 set_last_cursor(win); 1901 set_last_cursor(win);
1907 #else
1908 set_last_cursor(curwin);
1909 #endif
1910 1902
1911 fputs(_("\n# History of marks within files (newest to oldest):\n"), fp_out); 1903 fputs(_("\n# History of marks within files (newest to oldest):\n"), fp_out);
1912 FOR_ALL_BUFFERS(buf) 1904 FOR_ALL_BUFFERS(buf)
1913 { 1905 {
1914 /* 1906 /*