The SelectDirectory macro, found at the bottom of FPROMPT.S, displays a dialog that allows the user to select a directory. When the user does that, code in the macro adds that directory to the FPATH_HISTORY global list.
I just wrote a macro that used the SelectDirectory macro, but that was very unhappy that the FPATH_HISTORY list was modified by the call. So I made some changes to DIALOG.S, FPROMPT.S, and FPROMPT.SH that permit the caller (my macro) to disable this history-add. As several other macros accept a /NHA=1 parameter to allow the caller to avoid adding to history, I added /NHA=1 as a recognizable miscellaneous parameter to the DlgAddCtrl call for the Dlg_DirButton control. You may wish to consider incorporating this change into the standard macro code.
The attached file shows the changes I made. Note that these are based on v10 code. I have not checked whether the exact same changes would apply in v11. nwshist-addns.s