John Marriott wrote:

> On 29-Dec-2021 00:16, Bram Moolenaar wrote:
> > Patch 8.2.3920
> > Problem:    Restoring directory after using another window is inefficient.
> > Solution:   Only restore the directory for win_execute().  Apply 'autochdir'
> >              only when needed.
> > Files:      src/evalwindow.c, src/testdir/test_autochdir.vim
> >
> >
> >
> After this patch, mingw64 (gcc 11.2.0) spits out this error message if 
> FEAT_AUTOCHDIR is not defined (which is only defined if 
> FEAT_NETBEANS_INTG or FEAT_BIG are defined):
> <snip>
> gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO 
> -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return 
> -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD evalwindow.c -o 
> gobjnative/evalwindow.o
> evalwindow.c: In function 'f_win_execute':
> evalwindow.c:719:33: error: 'p_acd' undeclared (first use in this function)
>    719 |         if (cwd_status == OK && p_acd)
>        |                                 ^~~~~
> evalwindow.c:719:33: note: each undeclared identifier is reported only 
> once for each function it appears in
> make: *** [Make_cyg_ming.mak:1162: gobjnative/evalwindow.o] Error 1
> </snip>
> 
> The attached patch makes the error go away but I'm not sure that it is 
> correct.

Not quite, the directory still needs to be restored.  But I can see
where the problem is.

-- 
All true wisdom is found on T-shirts.

 /// 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/20211228200415.A65081C0641%40moolenaar.net.

Raspunde prin e-mail lui