Move endwin() down in wins_prepare_external()
Move endwin() down in wins_prepare_external()

Invoke endwin() *after* calling any other curses functions, such as
refresh(). Calling refresh() after endwin() might restore curses mode
which is a bad thing for a terminal mode initialization routine.

Signed-off-by: Lukas Fleischer <af90e31281d8305af43dc616c5aaca3c7165f8a7@cryptocrack.de>

dunecn/calcurse,lfos/calcurse,lfos/calcurse,dunecn/calcurse,lfos/calcurse