When using the Arduino IDE on Windows with an external editor (set as such in the preferences) simply clicking back onto the window doesn't refresh the sketch that is open. As far as I am aware, it must be reopened by clicking on its icon in the toolbar to get it to refresh the sketch.