aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-16 19:52:56 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-19 01:36:00 -0400
commit8bea8d7b4767d896e5c557ea9603e3d55e8e47af (patch)
treecc7d6f93bc90e18a6ed8a9149dcfbbd18c6291b2 /src/nvim/main.c
parent315076a26d225a3bdc34a2cbba1f124adf4e1087 (diff)
downloadrneovim-8bea8d7b4767d896e5c557ea9603e3d55e8e47af.tar.gz
rneovim-8bea8d7b4767d896e5c557ea9603e3d55e8e47af.tar.bz2
rneovim-8bea8d7b4767d896e5c557ea9603e3d55e8e47af.zip
vim-patch:8.0.1726: older MSVC doesn't support declarations halfway a block
Problem: Older MSVC doesn't support declarations halfway a block. Solution: Move the declaration back to the start of the block. https://github.com/vim/vim/commit/df2c774ded4c2ed169390a352099c23b6db657c4
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 2c182abb96..55be97d3f4 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -584,9 +584,7 @@ int main(int argc, char **argv)
void getout(int exitval)
FUNC_ATTR_NORETURN
{
- tabpage_T *tp, *next_tp;
-
- exiting = TRUE;
+ exiting = true;
/* When running in Ex mode an error causes us to exit with a non-zero exit
* code. POSIX requires this, although it's not 100% clear from the
@@ -603,8 +601,10 @@ void getout(int exitval)
hash_debug_results();
if (get_vim_var_nr(VV_DYING) <= 1) {
- /* Trigger BufWinLeave for all windows, but only once per buffer. */
- for (tp = first_tabpage; tp != NULL; tp = next_tp) {
+ const tabpage_T *next_tp;
+
+ // Trigger BufWinLeave for all windows, but only once per buffer.
+ for (const tabpage_T *tp = first_tabpage; tp != NULL; tp = next_tp) {
next_tp = tp->tp_next;
FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
if (wp->w_buffer == NULL) {