Patch 8.2.4060
Problem: win_execute() is slow on systems where getcwd() or chdir() is
slow. (Rick Howe)
Solution: Avoid using getcwd() and chdir() if no local directory is used and
'acd' is not set. (closes #9504)
Files: src/evalwindow.c
*** ../vim-8.2.4059/src/evalwindow.c 2022-01-10 13:36:31.264892417 +0000
--- src/evalwindow.c 2022-01-11 12:34:19.279334201 +0000
***************
*** 707,719 ****
{
pos_T curpos = wp->w_cursor;
char_u cwd[MAXPATHL];
! int cwd_status;
#ifdef FEAT_AUTOCHDIR
char_u autocwd[MAXPATHL];
int apply_acd = FALSE;
#endif
! cwd_status = mch_dirname(cwd, MAXPATHL);
#ifdef FEAT_AUTOCHDIR
// If 'acd' is set, check we are using that directory. If yes, then
--- 707,732 ----
{
pos_T curpos = wp->w_cursor;
char_u cwd[MAXPATHL];
! int cwd_status = FAIL;
#ifdef FEAT_AUTOCHDIR
char_u autocwd[MAXPATHL];
int apply_acd = FALSE;
#endif
! // Getting and setting directory can be slow on some systems, only do
! // this when the current or target window/tab have a local directory or
! // 'acd' is set.
! if (curwin != wp
! && (curwin->w_localdir != NULL
! || wp->w_localdir != NULL
! || (curtab != tp
! && (curtab->tp_localdir != NULL
! || tp->tp_localdir != NULL))
! #ifdef FEAT_AUTOCHDIR
! || p_acd
! #endif
! ))
! cwd_status = mch_dirname(cwd, MAXPATHL);
#ifdef FEAT_AUTOCHDIR
// If 'acd' is set, check we are using that directory. If yes, then
*** ../vim-8.2.4059/src/version.c 2022-01-11 11:58:14.924745969 +0000
--- src/version.c 2022-01-11 12:36:58.295177036 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4060,
/**/
--
press CTRL-ALT-DEL for more information
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220111123758.826781C051B%40moolenaar.net.