# HG changeset patch # User Bram Moolenaar # Date 1637602205 -3600 # Node ID 92bad8cd95d53a5cffd3382bfb15a85cfe5d178f # Parent f1f2bf26c81e4e50748bbd82f2fa7e1f23e0d98c patch 8.2.3648: "verbose pwd" is incorrect after dropping files on Vim Commit: https://github.com/vim/vim/commit/4671e88d7d3ed12206d9cdd8892fe3b2cbc0d6ab Author: Bram Moolenaar Date: Mon Nov 22 17:21:48 2021 +0000 patch 8.2.3648: "verbose pwd" is incorrect after dropping files on Vim Problem: "verbose pwd" is incorrect after dropping files on Vim. Solution: Set the chdir reason to "drop". diff --git a/src/gui.c b/src/gui.c --- a/src/gui.c +++ b/src/gui.c @@ -5525,6 +5525,7 @@ gui_wingoto_xy(int x, int y) drop_callback(void *cookie) { char_u *p = cookie; + int do_shorten = FALSE; // If Shift held down, change to first file's directory. If the first // item is a directory, change to that directory (and let the explorer @@ -5534,11 +5535,16 @@ drop_callback(void *cookie) if (mch_isdir(p)) { if (mch_chdir((char *)p) == 0) - shorten_fnames(TRUE); + do_shorten = TRUE; } else if (vim_chdirfile(p, "drop") == OK) + do_shorten = TRUE; + vim_free(p); + if (do_shorten) + { shorten_fnames(TRUE); - vim_free(p); + last_chdir_reason = "drop"; + } } // Update the screen display @@ -5635,7 +5641,7 @@ gui_handle_drop( } else handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0, - drop_callback, (void *)p); + drop_callback, (void *)p); } entered = FALSE; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3648, +/**/ 3647, /**/ 3646,