displaying mode lines, and temporarily set selected_frame to the frame of the window that's redisplayed.
Attach a file by drag & drop or click to upload