Just tested that now. The selection cursor shows on the item that you had last selected, but with my edit, it will select item[0] every time when you select the category.
Care to share your edit?
So I went back through to find exactly what I changed, because like I said trial and error (my coding knowledge is high school level visual basic so very rudimentary). Anyway, I found in Yanfly's Shop Script I made 2 removals
Around line 1282 in the command_buy section I removed
@buy_window.select(@last_buy_index)
Also Around Line 1304 from the on_buy_cancel section I removed
@last_buy_index = @buy_window.index
Then here is how I edited yours, along with the note at the top to remind me that it needed to be above the Yanfly Shop Script to function properly (sections disappeared when it was below in the load order)
I'm sure I put some unnecessary bits in there and did it inefficiently, but I'm a newb.
So my edits were somewhat knit picky, but they were to make it function like the sell options.
Like I mentioned previously for example
I would go to buy armor and there were 5 armors. If I were to move my selection down to the 5th armor and then back out twice which would take me back to the Buy or Sell option window. Then go back into buy and go to the category of weapon (not into it just move the selection over that category) that only had 1 weapon, but the window that lists the weapons would show the selection box unactivated and 5 slots down floating over nothing.
Also when just selecting Buy and before selecting the category, that selection box was showing unactivated down on the first item.
I had found that in Yanfly's script when selling and scrolling through the categories that the selection box was never visible on the items, armors, etc. until you chose the category to drop down to the list. So I was changing alot of things and "trial and erroring" your script to get that floating selection box to go away.
I'm not really sure how the dummy window functions, my guess was it was showing the last created buy window and I was thinking that was why the selection box wasn't disappearing like I wanted it too. I could be totally wrong on that, but that was part of my thought process. Anyway for not knowing exactly what I was doing I was fairly proud of myself for even being able to tweak your code to get what I wanted out of it. So even though my games are just my own personal hobby and will never see the light of day I greatly appreciate your help and the help of others across these forums to get me through the roadblocks I encounter.
One more question to pose to you. Is it easily achievable (or possible) for the initial window (the one before you select Buy) to show all the things the vendor has for sale (or no items at all, if the previous is not possible)? That's the only thing I miss. Now that the categories are there that initial window just shows the first category instead of everything. I have a feeling that's asking more then is doable from this.