Patch 8.2.3536

2021-10-18 Fir de Conversatie Bram Moolenaar


Patch 8.2.3536
Problem:The do_highlight() function is way too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan,
closes #9011)
Files:  src/highlight.c


*** ../vim-8.2.3535/src/highlight.c 2021-10-15 22:25:37.785385044 +0100
--- src/highlight.c 2021-10-18 22:12:59.041516541 +0100
***
*** 377,386 
  #ifdef FEAT_EVAL
  char_u*p;
  
! /*
!  * Try finding the color scheme file.  Used when a color file was loaded
!  * and 'background' or 't_Co' is changed.
!  */
  p = get_var_value((char_u *)"g:colors_name");
  if (p != NULL)
  {
--- 377,384 
  #ifdef FEAT_EVAL
  char_u*p;
  
! // Try finding the color scheme file.  Used when a color file was loaded
! // and 'background' or 't_Co' is changed.
  p = get_var_value((char_u *)"g:colors_name");
  if (p != NULL)
  {
***
*** 400,408 
  
  #endif
  
! /*
!  * Didn't use a color file, use the compiled-in colors.
!  */
  if (both)
  {
had_both = TRUE;
--- 398,404 
  
  #endif
  
! // Didn't use a color file, use the compiled-in colors.
  if (both)
  {
had_both = TRUE;
***
*** 441,449 
  }
  
  #ifdef FEAT_SYN_HL
! /*
!  * If syntax highlighting is enabled load the highlighting for it.
!  */
  if (get_var_value((char_u *)"g:syntax_on") != NULL)
  {
static int  recursive = 0;
--- 437,443 
  }
  
  #ifdef FEAT_SYN_HL
! // If syntax highlighting is enabled load the highlighting for it.
  if (get_var_value((char_u *)"g:syntax_on") != NULL)
  {
static int  recursive = 0;
***
*** 581,591 
  else if (t_colors == 16 || t_colors == 88
   || t_colors >= 256)
  {
!   /*
!* Guess: if the termcap entry ends in 'm', it is
!* probably an xterm-like terminal.  Use the changed
!* order for colors.
!*/
if (*T_CAF != NUL)
p = T_CAF;
else
--- 575,583 
  else if (t_colors == 16 || t_colors == 88
   || t_colors >= 256)
  {
!   // Guess: if the termcap entry ends in 'm', it is
!   // probably an xterm-like terminal.  Use the changed
!   // order for colors.
if (*T_CAF != NUL)
p = T_CAF;
else
***
*** 611,616 
--- 603,1360 
  }
  
  /*
+  * Link highlight group 'from_hg' to 'to_hg'.
+  * 'dodefault' is set to TRUE for ":highlight default link".
+  * 'forceit' is set to TRUE for ":higlight! link"
+  * 'init' is set to TRUE when initializing all the highlight groups.
+  */
+ static void
+ highlight_group_link(
+   char_u  *from_hg,
+   int from_len,
+   char_u  *to_hg,
+   int to_len,
+   int dodefault,
+   int forceit,
+   int init)
+ {
+ int   from_id;
+ int   to_id;
+ hl_group_T*hlgroup = NULL;
+ 
+ from_id = syn_check_group(from_hg, from_len);
+ if (STRNCMP(to_hg, "NONE", 4) == 0)
+   to_id = 0;
+ else
+   to_id = syn_check_group(to_hg, to_len);
+ 
+ if (from_id > 0)
+ {
+   hlgroup = _TABLE()[from_id - 1];
+   if (dodefault && (forceit || hlgroup->sg_deflink == 0))
+   {
+   hlgroup->sg_deflink = to_id;
+ #ifdef FEAT_EVAL
+   hlgroup->sg_deflink_sctx = current_sctx;
+   hlgroup->sg_deflink_sctx.sc_lnum += SOURCING_LNUM;
+ #endif
+   }
+ }
+ 
+ if (from_id > 0 && (!init || hlgroup->sg_set == 0))
+ {
+   // Don't allow a link when there already is some highlighting
+   // for the group, unless '!' is used
+   if (to_id > 0 && !forceit && !init
+   && hl_has_settings(from_id - 1, dodefault))
+   {
+   if (SOURCING_NAME == NULL && !dodefault)
+   emsg(_("E414: group has settings, highlight link ignored"));
+   }
+   else if (hlgroup->sg_link != to_id
+ #ifdef FEAT_EVAL
+   || hlgroup->sg_script_ctx.sc_sid != current_sctx.sc_sid
+ #endif
+   || hlgroup->sg_cleared)
+   {
+   if (!init)
+   hlgroup->sg_set |= SG_LINK;
+   hlgroup->sg_link = to_id;
+ #ifdef FEAT_EVAL
+   hlgroup->sg_script_ctx = current_sctx;
+   hlgroup->sg_script_ctx.sc_lnum += SOURCING_LNUM;
+ #endif
+   hlgroup->sg_cleared = FALSE;
+   redraw_all_later(SOME_VALID);
+ 
+   // Only call highlight_changed() once after multiple changes.
+   need_highlight_changed = TRUE;
+   }
+ }
+ 
+ }
+ 
+ /*
+  * Reset all highlighting to the defaults. Removes all highlighting for the
+  * groups added by the user.
+  */
+ static void
+ highlight_reset_all(void)
+ {
+ int   idx;
+ 
+ #ifdef FEAT_GUI
+ // First, we do not destroy the old values, but allocate the new
+ 

Patch 8.2.3535

2021-10-18 Fir de Conversatie Bram Moolenaar


Patch 8.2.3535
Problem:If-else indenting is confusing.
Solution:   Add curly brackets and indent. (Dominique Pellé, closes #9010)
Files:  src/drawscreen.c


*** ../vim-8.2.3534/src/drawscreen.c2021-10-08 18:39:23.595208057 +0100
--- src/drawscreen.c2021-10-18 20:52:15.871708147 +0100
***
*** 2305,2317 
++new_rows;
else
  #endif
  #ifdef FEAT_DIFF
if (l == wp->w_topline)
!   new_rows += plines_win_nofill(wp, l, TRUE)
  + wp->w_topfill;
!   else
  #endif
!   new_rows += plines_win(wp, l, TRUE);
++j;
if (new_rows > wp->w_height - row - 2)
{
--- 2305,2319 
++new_rows;
else
  #endif
+   {
  #ifdef FEAT_DIFF
if (l == wp->w_topline)
!   new_rows += plines_win_nofill(wp, l, TRUE)
  + wp->w_topfill;
!   else
  #endif
!   new_rows += plines_win(wp, l, TRUE);
!   }
++j;
if (new_rows > wp->w_height - row - 2)
{
*** ../vim-8.2.3534/src/version.c   2021-10-18 14:37:09.674150954 +0100
--- src/version.c   2021-10-18 20:56:23.513479895 +0100
***
*** 759,760 
--- 759,762 
  {   /* Add new patch number below this line */
+ /**/
+ 3535,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
193. You ask your girlfriend to drive home so you can sit back with
 your PDA and download the information to your laptop

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018195739.353EAC80053%40moolenaar.net.


Re: Build failure of 8.2.3510 on older Ubuntu system

2021-10-18 Fir de Conversatie Gary Johnson
On 2021-10-18, Bram Moolenaar wrote:
> Gary Johnson wrote:
> 
> > > > On 2021-10-17, Dominique Pell=C3=A9 wrote:
> > > > > Gary Johnson  wrote:
> > > > > 
> > > > > > I have an older Ubuntu 10.04.4 system that I cannot upgrade for
> > > > > > various reasons.  It's what I can run on that hardware.  A recent
> > > > > > update of Vim failed to build.  A git bisect narrowed it down to the
> > > > > > 8.2.3510 commit.  Here is the gcc command that failed.
> > > > > >
> > > > > >
> > > > > > gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  
> > > > > > -pthread -D_REENTRANT -I/usr/include/gtk-2.0 
> > > > > > -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
> > > > > > -I/usr/include/cairo -I/usr/include/pango-1.0 
> > > > > > -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
> > > > > > -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
> > > > > > -I/usr/include/freetype2 -I/usr/include/directfb 
> > > > > > -I/usr/include/libpng12 -g3 -Wno-deprecated-declarations 
> > > > > > -DFEAT_BROWSE -DFEAT_CONCEAL -DFEAT_MOUSE_SGR -DFEAT_VARTABS 
> > > > > > -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o 
> > > > > > objects/fileio.o fileio.c
> > > > > > In file included from vim.h:151,
> > > > > >  from fileio.c:14:
> > > > > > feature.h:656:1: warning: "FEAT_BROWSE" redefined
> > > > > > : warning: this is the location of the previous 
> > > > > > definition
> > > > > > fileio.c: In function ‘time_differs’:
> > > > > > fileio.c:3130: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > > > fileio.c: In function ‘buf_store_time’:
> > > > > > fileio.c:4483: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > > > fileio.c: In function ‘vim_opentempdir’:
> > > > > > fileio.c:5033: warning: implicit declaration of function ‘dirfd’
> > > > > > make[2]: *** [objects/fileio.o] Error 1
> > > > > > make[2]: Leaving directory 
> > > > > > `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > > > make[1]: *** [reconfig] Error 2
> > > > > > make[1]: Leaving directory 
> > > > > > `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > > > make: *** [first] Error 2
> > > > > >
> > > > > >
> > > > > > gcc is (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3.
> > > > > 
> > > > > That compilation error (st_mtim -> st_mtime) is meant to be fixed
> > > > > by Vim 8.2.215. Consider posting the compilation error (if any) with
> > > > > the latest vim 8.2.3531.
> > > > 
> > > > That's when I first noticed it, is when I updated today to 8.2.3531.
> > > > Here's the error message from that build.
> > > > 
> > > > 
> > > > gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
> > > > -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
> > > > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 
> > > > -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
> > > > -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
> > > > -I/usr/include/freetype2 -I/usr/include/directfb 
> > > > -I/usr/include/libpng12 -g3 -Wno-deprecated-declarations 
> > > > -DFEAT_BROWSE -DFEAT_CONCEAL -DFEAT_MOUSE_SGR -DFEAT_VARTABS 
> > > > -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o 
> > > > objects/getchar.o getchar.c
> > > > In file included from vim.h:151,
> > > >  from getchar.c:19:
> > > > feature.h:656:1: warning: "FEAT_BROWSE" redefined
> > > > : warning: this is the location of the previous definition
> > > > fileio.c: In function ‘time_differs’:
> > > > fileio.c:3126: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > fileio.c: In function ‘buf_store_time’:
> > > > fileio.c:4484: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > fileio.c: In function ‘vim_opentempdir’:
> > > > fileio.c:5034: warning: implicit declaration of function ‘dirfd’
> > > > make[2]: *** [objects/fileio.o] Error 1
> > > > make[2]: *** Waiting for unfinished jobs
> > > > make[2]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > make[1]: *** [reconfig] Error 2
> > > > make[1]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > make: *** [first] Error 2
> > > 
> > > This looks like configure defined ST_MTIM_NSEC to st_mtim.tv_nsec even
> > > though it does not work.  Please check the output of configure, should
> > > be in src/auto/config.log
> > 
> > I assume that this is the part of config.log you're interested in.
> > 
> > 
> > configure:13152: checking for nanoseconds field of struct stat
> > configure:13180: gcc -std=gnu99 -c -g3 -Wno-deprecated-declarations 
> > -DFEAT_BROWSE -DFEAT_CONCEAL -DFEAT_MOUSE_SGR -DFEAT_VARTABS  
> > -DST_MTIM_NSEC=st_mtim.tv_nsec conftest.c >&5
> > configure:13180: $? = 0
> > configure:13188: result: st_mtim.tv_nsec
> > 
> > 
> > I can work around the problem by commenting-out this #define in
> > vim/src/auto/config.h:
> > 
> > /* Define to nanoseconds field of struct stat */
> > #define ST_MTIM_NSEC st_mtim.tv_nsec
> > 
> > but I haven't worked with configure recently and 

Re: Ctrl shortcuts stop working after Ctrl-;

2021-10-18 Fir de Conversatie 'Daniel Martí' via vim_dev
I might have raised this issue in the wrong place :)
I have now filed it as https://github.com/vim/vim/issues/9014.

On Mon, Sep 27, 2021 at 13:44:34 +0100, Daniel Martí wrote:
> Hi all,
> 
> I've had a weird bug for about a year now,
> where these four keyboard shortcuts would stop working eventually:
> 
>   nnoremap  
>   nnoremap  
>   nnoremap  
>   nnoremap  
> 
> In particular, they would revert to their original function,
> almost as if they were never mapped in my vimrc.
> For example,  would revert to "clear", and  to "backspace"
> The only way to resolve this issue would be to restart Vim.
> 
> With the help of Paul Jolly, who also ran into this bug,
> we were able to narrow it down: it happens after we press .
> That is, control-semicolon.
> 
> Note that some terminals do not seem to emit escape codes for .
> For example, for xterm, one needs this extra setting in .Xresources:
> 
>   XTerm*vt100.modifyOtherKeys: 1
> 
> I have been able to reproduce this with xterm 369 and vim 8.2.3441.
> Both with only the options listed above, and no extra plugins.
> With a feature like "modifyOtherKeys" disabled, the bug disappears,
> as it seems like xterm just sends ";" when pressing .
> 
> For clarity, here's what I do to reproduce it with two sample files:
> 
> 1) vim foo.txt
> 2) :vsp bar.txt
> 3) Verify that  and  work to switch back and forth
> 4) Press 
> 5) Notice that  and  no longer work to switch buffers
> 
> I've spent hours investigating this bug, and this is as far as I've got.
> I'm hoping someone in this mailing list can shed some light into it.
> My best guess is this is a bug in how Vim handles ANSI escape codes.
> 
> Note that if I "xterm -e dash" and press ,
> I get the following escape code: ^[[27;5;59~
> 
> Here are other scenarios I've ruled out:
> 
> * Terminal emulator bug; it also reproduces with my emulator of choice,
>   https://codeberg.org/dnkl/foot/, which implements "modifyOtherKeys".
> 
> * Issue with my vimrc; reproduced with just those four lines.
> 
> * Issue with vim running inside bash; happens with "xterm -e vim" too.
> 
> * System shortcuts; Paul and myself can reproduce on different setups.
> 
> Any help appreciated. Happy to try patches or capture debug logs.
> 
> Thank you!

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018144651.e6cm6ckuiy6uncpp%40p14s.localdomain.


Patch 8.2.3534

2021-10-18 Fir de Conversatie Bram Moolenaar


Patch 8.2.3534
Problem:Autoread test is a bit flaky.
Solution:   Wait a brief moment before overwriting the file.
Files:  src/testdir/test_stat.vim


*** ../vim-8.2.3533/src/testdir/test_stat.vim   2021-10-15 17:09:45.407279908 
+0100
--- src/testdir/test_stat.vim   2021-10-18 14:33:53.111299721 +0100
***
*** 104,110 
setlocal autoread
call setline(1, 'foo')
w!
!   silent !echo bar > Xautoread
sleep 10m
checktime
call assert_equal('bar', trim(getline(1)))
--- 104,111 
setlocal autoread
call setline(1, 'foo')
w!
!   sleep 10m
!   call writefile(['bar'], 'Xautoread')
sleep 10m
checktime
call assert_equal('bar', trim(getline(1)))
*** ../vim-8.2.3533/src/version.c   2021-10-18 13:15:59.845862991 +0100
--- src/version.c   2021-10-18 14:35:09.192397113 +0100
***
*** 759,760 
--- 759,762 
  {   /* Add new patch number below this line */
+ /**/
+ 3534,
  /**/

-- 
I'm in shape.  Round IS a shape.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018133741.38727C80053%40moolenaar.net.


Patch 8.2.3533

2021-10-18 Fir de Conversatie Bram Moolenaar


Patch 8.2.3533
Problem:Inefficient code in xxd.
Solution:   Don't use "p" when "hextype" is non-zero. (closes #9013)
Files:  src/xxd/xxd.c


*** ../vim-8.2.3532/src/xxd/xxd.c   2021-10-17 16:09:05.286073690 +0100
--- src/xxd/xxd.c   2021-10-18 13:14:41.640950478 +0100
***
*** 302,321 
  
ign_garb = 0;
  
!   if (p >= cols)
{
! if (!hextype)
{
! if (n1 < 0)
!   {
! p = 0;
! continue;
!   }
! want_off = (want_off << 4) | n1;
  continue;
}
! else
!   p = 0;
}
  
if (base_off + want_off != have_off)
--- 302,316 
  
ign_garb = 0;
  
!   if (!hextype && (p >= cols))
{
! if (n1 < 0)
{
! p = 0;
  continue;
}
! want_off = (want_off << 4) | n1;
! continue;
}
  
if (base_off + want_off != have_off)
***
*** 344,350 
  have_off++;
  want_off++;
  n1 = -1;
! if ((++p >= cols) && !hextype)
{
  /* skip the rest of the line as garbage */
  n2 = -1;
--- 339,345 
  have_off++;
  want_off++;
  n1 = -1;
! if (!hextype && (++p >= cols))
{
  /* skip the rest of the line as garbage */
  n2 = -1;
*** ../vim-8.2.3532/src/version.c   2021-10-17 21:53:54.588481239 +0100
--- src/version.c   2021-10-18 13:15:47.973723108 +0100
***
*** 759,760 
--- 759,762 
  {   /* Add new patch number below this line */
+ /**/
+ 3533,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
189. You put your e-mail address in the upper left-hand corner of envelopes.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018121631.B2F16C80055%40moolenaar.net.


Re: Build failure of 8.2.3510 on older Ubuntu system

2021-10-18 Fir de Conversatie Bram Moolenaar


Gary Johnson wrote:

> > > On 2021-10-17, Dominique Pell=C3=A9 wrote:
> > > > Gary Johnson  wrote:
> > > > 
> > > > > I have an older Ubuntu 10.04.4 system that I cannot upgrade for
> > > > > various reasons.  It's what I can run on that hardware.  A recent
> > > > > update of Vim failed to build.  A git bisect narrowed it down to the
> > > > > 8.2.3510 commit.  Here is the gcc command that failed.
> > > > >
> > > > >
> > > > > gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  
> > > > > -pthread -D_REENTRANT -I/usr/include/gtk-2.0 
> > > > > -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
> > > > > -I/usr/include/cairo -I/usr/include/pango-1.0 
> > > > > -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
> > > > > -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
> > > > > -I/usr/include/freetype2 -I/usr/include/directfb 
> > > > > -I/usr/include/libpng12 -g3 -Wno-deprecated-declarations 
> > > > > -DFEAT_BROWSE -DFEAT_CONCEAL -DFEAT_MOUSE_SGR -DFEAT_VARTABS 
> > > > > -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o 
> > > > > objects/fileio.o fileio.c
> > > > > In file included from vim.h:151,
> > > > >  from fileio.c:14:
> > > > > feature.h:656:1: warning: "FEAT_BROWSE" redefined
> > > > > : warning: this is the location of the previous 
> > > > > definition
> > > > > fileio.c: In function ‘time_differs’:
> > > > > fileio.c:3130: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > > fileio.c: In function ‘buf_store_time’:
> > > > > fileio.c:4483: error: ‘stat_T’ has no member named ‘st_mtim’
> > > > > fileio.c: In function ‘vim_opentempdir’:
> > > > > fileio.c:5033: warning: implicit declaration of function ‘dirfd’
> > > > > make[2]: *** [objects/fileio.o] Error 1
> > > > > make[2]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > > make[1]: *** [reconfig] Error 2
> > > > > make[1]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > > > make: *** [first] Error 2
> > > > >
> > > > >
> > > > > gcc is (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3.
> > > > 
> > > > That compilation error (st_mtim -> st_mtime) is meant to be fixed
> > > > by Vim 8.2.215. Consider posting the compilation error (if any) with
> > > > the latest vim 8.2.3531.
> > > 
> > > That's when I first noticed it, is when I updated today to 8.2.3531.
> > > Here's the error message from that build.
> > > 
> > > 
> > > gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
> > > -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
> > > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 
> > > -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
> > > -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
> > > -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12  
> > >-g3 -Wno-deprecated-declarations -DFEAT_BROWSE -DFEAT_CONCEAL 
> > > -DFEAT_MOUSE_SGR -DFEAT_VARTABS -D_REENTRANT -U_FORTIFY_SOURCE 
> > > -D_FORTIFY_SOURCE=1-o objects/getchar.o getchar.c
> > > In file included from vim.h:151,
> > >  from getchar.c:19:
> > > feature.h:656:1: warning: "FEAT_BROWSE" redefined
> > > : warning: this is the location of the previous definition
> > > fileio.c: In function ‘time_differs’:
> > > fileio.c:3126: error: ‘stat_T’ has no member named ‘st_mtim’
> > > fileio.c: In function ‘buf_store_time’:
> > > fileio.c:4484: error: ‘stat_T’ has no member named ‘st_mtim’
> > > fileio.c: In function ‘vim_opentempdir’:
> > > fileio.c:5034: warning: implicit declaration of function ‘dirfd’
> > > make[2]: *** [objects/fileio.o] Error 1
> > > make[2]: *** Waiting for unfinished jobs
> > > make[2]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > make[1]: *** [reconfig] Error 2
> > > make[1]: Leaving directory `/mnt/home-common/gary/src/vim-new/vim/src'
> > > make: *** [first] Error 2
> > 
> > This looks like configure defined ST_MTIM_NSEC to st_mtim.tv_nsec even
> > though it does not work.  Please check the output of configure, should
> > be in src/auto/config.log
> 
> I assume that this is the part of config.log you're interested in.
> 
> 
> configure:13152: checking for nanoseconds field of struct stat
> configure:13180: gcc -std=gnu99 -c -g3 -Wno-deprecated-declarations 
> -DFEAT_BROWSE -DFEAT_CONCEAL -DFEAT_MOUSE_SGR -DFEAT_VARTABS  
> -DST_MTIM_NSEC=st_mtim.tv_nsec conftest.c >&5
> configure:13180: $? = 0
> configure:13188: result: st_mtim.tv_nsec
> 
> 
> I can work around the problem by commenting-out this #define in
> vim/src/auto/config.h:
> 
> /* Define to nanoseconds field of struct stat */
> #define ST_MTIM_NSEC st_mtim.tv_nsec
> 
> but I haven't worked with configure recently and don't know
> immediately how to fix the root problem.

Find this line in auto/configure:

 for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec 
st_mtime_n st_mtimespec.tv_nsec; do

Try changing the order of the entries.  I guess it might work better 

Re: Patch 8.2.3528

2021-10-18 Fir de Conversatie Bram Moolenaar


James McCoy wrote:

> > +   if has('patch-8.2.3520')
> 
> Why not use "exists('+thesaurusfunc')" here?  IMHO, patch number checks
> should be reserved for things that don't have more explicit checks.

Yes, that is better.

-- 
hundred-and-one symptoms of being an internet addict:
182. You may not know what is happening in the world, but you know
 every bit of net-gossip there is.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211018090503.3BA96C80053%40moolenaar.net.