If the option "File Status Autodetection" is enabled then NP++ asks whether the file should be re-read from disc for every open (and changed) file. After that, the user is left in some other file than what was active before the questions.
This patch tries to re-activate the buffer that was active before the file updates thus retaining the editing context.
A better solution would be IMO to only ask "Re read?" for a buffer only when the buffer gets activated, but I don't know NP++ code well and hence can't implement that.
The attached patch tries to restore the active buffer -- a suboptimal solution but still better than how it's done now.