Mercurial > vim
comparison src/session.c @ 17539:554240b9574b v8.1.1767
patch 8.1.1767: FEAT_SESSION defined separately
commit https://github.com/vim/vim/commit/f96ae0b5a2e9e097c38cec04ec35364565d42271
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 28 15:21:55 2019 +0200
patch 8.1.1767: FEAT_SESSION defined separately
Problem: FEAT_SESSION defined separately.
Solution: Make FEAT_SESSION depend on FEAT_EVAL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Jul 2019 15:30:04 +0200 |
parents | e00d12c085a5 |
children | 4d63d47d87ef |
comparison
equal
deleted
inserted
replaced
17538:c1629b49142c | 17539:554240b9574b |
---|---|
1061 #if defined(FEAT_SESSION) && defined(USE_CRNL) | 1061 #if defined(FEAT_SESSION) && defined(USE_CRNL) |
1062 # define MKSESSION_NL | 1062 # define MKSESSION_NL |
1063 static int mksession_nl = FALSE; // use NL only in put_eol() | 1063 static int mksession_nl = FALSE; // use NL only in put_eol() |
1064 #endif | 1064 #endif |
1065 | 1065 |
1066 #if defined(FEAT_SESSION) || defined(PROTO) | |
1067 /* | 1066 /* |
1068 * ":mkexrc", ":mkvimrc", ":mkview" and ":mksession". | 1067 * ":mkexrc", ":mkvimrc", ":mkview" and ":mksession". |
1069 */ | 1068 */ |
1070 void | 1069 void |
1071 ex_mkrc(exarg_T *eap) | 1070 ex_mkrc(exarg_T *eap) |
1242 -1) == FAIL); | 1241 -1) == FAIL); |
1243 } | 1242 } |
1244 if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save") | 1243 if (put_line(fd, "let &so = s:so_save | let &siso = s:siso_save") |
1245 == FAIL) | 1244 == FAIL) |
1246 failed = TRUE; | 1245 failed = TRUE; |
1247 # ifdef FEAT_SEARCH_EXTRA | 1246 #ifdef FEAT_SEARCH_EXTRA |
1248 if (no_hlsearch && put_line(fd, "nohlsearch") == FAIL) | 1247 if (no_hlsearch && put_line(fd, "nohlsearch") == FAIL) |
1249 failed = TRUE; | 1248 failed = TRUE; |
1250 # endif | 1249 #endif |
1251 if (put_line(fd, "doautoall SessionLoadPost") == FAIL) | 1250 if (put_line(fd, "doautoall SessionLoadPost") == FAIL) |
1252 failed = TRUE; | 1251 failed = TRUE; |
1253 if (eap->cmdidx == CMD_mksession) | 1252 if (eap->cmdidx == CMD_mksession) |
1254 { | 1253 { |
1255 if (put_line(fd, "unlet SessionLoad") == FAIL) | 1254 if (put_line(fd, "unlet SessionLoad") == FAIL) |
1262 | 1261 |
1263 failed |= fclose(fd); | 1262 failed |= fclose(fd); |
1264 | 1263 |
1265 if (failed) | 1264 if (failed) |
1266 emsg(_(e_write)); | 1265 emsg(_(e_write)); |
1267 #if defined(FEAT_EVAL) && defined(FEAT_SESSION) | 1266 #if defined(FEAT_SESSION) |
1268 else if (eap->cmdidx == CMD_mksession) | 1267 else if (eap->cmdidx == CMD_mksession) |
1269 { | 1268 { |
1270 // successful session write - set this_session var | 1269 // successful session write - set this_session var |
1271 char_u *tbuf; | 1270 char_u *tbuf; |
1272 | 1271 |
1291 #ifdef FEAT_SESSION | 1290 #ifdef FEAT_SESSION |
1292 vim_free(viewFile); | 1291 vim_free(viewFile); |
1293 #endif | 1292 #endif |
1294 } | 1293 } |
1295 | 1294 |
1296 #endif // FEAT_SESSION | 1295 #if (defined(FEAT_VIMINFO) || defined(FEAT_SESSION)) || defined(PROTO) |
1297 | |
1298 #if defined(FEAT_VIMINFO) || defined(FEAT_SESSION) | |
1299 var_flavour_T | 1296 var_flavour_T |
1300 var_flavour(char_u *varname) | 1297 var_flavour(char_u *varname) |
1301 { | 1298 { |
1302 char_u *p = varname; | 1299 char_u *p = varname; |
1303 | 1300 |