Mercurial > vim
comparison src/main.c @ 18108:76126690dd92 v8.1.2049
patch 8.1.2049: cannot build tiny version
Commit: https://github.com/vim/vim/commit/397c6a1438186adef54fe5113690307e644b0f42
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 17 20:54:31 2019 +0200
patch 8.1.2049: cannot build tiny version
Problem: Cannot build tiny version.
Solution: Add #ifdefs.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 17 Sep 2019 21:00:04 +0200 |
parents | b456bba1276a |
children | 7f57ea9a4ba8 |
comparison
equal
deleted
inserted
replaced
18107:cd42ae3230ca | 18108:76126690dd92 |
---|---|
1059 && stuff_empty() | 1059 && stuff_empty() |
1060 && typebuf.tb_len == 0 | 1060 && typebuf.tb_len == 0 |
1061 && scriptin[curscript] == NULL | 1061 && scriptin[curscript] == NULL |
1062 && !global_busy; | 1062 && !global_busy; |
1063 | 1063 |
1064 #ifdef FEAT_JOB_CHANNEL | |
1064 if (was_safe != is_safe) | 1065 if (was_safe != is_safe) |
1065 // Only log when the state changes, otherwise it happens at nearly | 1066 // Only log when the state changes, otherwise it happens at nearly |
1066 // every key stroke. | 1067 // every key stroke. |
1067 ch_log(NULL, is_safe ? "Start triggering SafeState" | 1068 ch_log(NULL, is_safe ? "Start triggering SafeState" |
1068 : "Stop triggering SafeState"); | 1069 : "Stop triggering SafeState"); |
1070 #endif | |
1069 if (is_safe) | 1071 if (is_safe) |
1070 apply_autocmds(EVENT_SAFESTATE, NULL, NULL, FALSE, curbuf); | 1072 apply_autocmds(EVENT_SAFESTATE, NULL, NULL, FALSE, curbuf); |
1071 was_safe = is_safe; | 1073 was_safe = is_safe; |
1072 } | 1074 } |
1073 | 1075 |
1077 * may_trigger_safestate(). | 1079 * may_trigger_safestate(). |
1078 */ | 1080 */ |
1079 void | 1081 void |
1080 state_no_longer_safe(void) | 1082 state_no_longer_safe(void) |
1081 { | 1083 { |
1084 #ifdef FEAT_JOB_CHANNEL | |
1082 if (was_safe) | 1085 if (was_safe) |
1083 ch_log(NULL, "safe state reset"); | 1086 ch_log(NULL, "safe state reset"); |
1087 #endif | |
1084 was_safe = FALSE; | 1088 was_safe = FALSE; |
1085 } | 1089 } |
1086 | 1090 |
1087 /* | 1091 /* |
1088 * Invoked when leaving code that invokes callbacks. Then trigger | 1092 * Invoked when leaving code that invokes callbacks. Then trigger |
1091 void | 1095 void |
1092 may_trigger_safestateagain(void) | 1096 may_trigger_safestateagain(void) |
1093 { | 1097 { |
1094 if (was_safe) | 1098 if (was_safe) |
1095 { | 1099 { |
1100 #ifdef FEAT_JOB_CHANNEL | |
1096 ch_log(NULL, "Leaving unsafe area, triggering SafeStateAgain"); | 1101 ch_log(NULL, "Leaving unsafe area, triggering SafeStateAgain"); |
1102 #endif | |
1097 apply_autocmds(EVENT_SAFESTATEAGAIN, NULL, NULL, FALSE, curbuf); | 1103 apply_autocmds(EVENT_SAFESTATEAGAIN, NULL, NULL, FALSE, curbuf); |
1098 } | 1104 } |
1105 #ifdef FEAT_JOB_CHANNEL | |
1099 else | 1106 else |
1100 ch_log(NULL, "Leaving unsafe area, not triggering SafeStateAgain"); | 1107 ch_log(NULL, "Leaving unsafe area, not triggering SafeStateAgain"); |
1108 #endif | |
1101 } | 1109 } |
1102 | 1110 |
1103 | 1111 |
1104 /* | 1112 /* |
1105 * Main loop: Execute Normal mode commands until exiting Vim. | 1113 * Main loop: Execute Normal mode commands until exiting Vim. |