# HG changeset patch # User Christian Brabandt # Date 1524569407 -7200 # Node ID 63679d671cedbce9e1f5071d3361a087b1774a26 # Parent 9e13085c80f6f178c8a5508e8ad6ccdeec121034 patch 8.0.1751: #ifdef causes bad highlighting commit https://github.com/vim/vim/commit/4e601e3c82899b3a8334856397946efeaa007f29 Author: Bram Moolenaar Date: Tue Apr 24 13:29:51 2018 +0200 patch 8.0.1751: #ifdef causes bad highlighting Problem: #ifdef causes bad highlighting. Solution: Move code around. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2731) diff --git a/src/ui.c b/src/ui.c --- a/src/ui.c +++ b/src/ui.c @@ -1854,18 +1854,15 @@ fill_input_buf(int exit_on_error UNUSED) len = 0; /* to avoid gcc warning */ for (try = 0; try < 100; ++try) { -# ifdef VMS - len = vms_read( -# else - len = read(read_cmd_fd, + size_t readlen = (size_t)((INBUFLEN - inbufcount) +# ifdef FEAT_MBYTE + / input_conv.vc_factor # endif - (char *)inbuf + inbufcount, (size_t)((INBUFLEN - inbufcount) -# ifdef FEAT_MBYTE - / input_conv.vc_factor -# endif - )); -# if 0 - ) /* avoid syntax highlight error */ + ); +# ifdef VMS + len = vms_read(read_cmd_fd, (char *)inbuf + inbufcount, readlen); +# else + len = read(read_cmd_fd, (char *)inbuf + inbufcount, readlen); # endif if (len > 0 || got_int) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1751, +/**/ 1750, /**/ 1749,