- if (reset_terminal_modes_hook)
- (*reset_terminal_modes_hook) ();
- return;
- }
- if (TN_standout_width < 0)
- turn_off_highlight ();
- turn_off_insert ();
- OUTPUT_IF (TS_end_keypad_mode);
- OUTPUT_IF (TS_cursor_normal);
- OUTPUT_IF (TS_end_termcap_modes);
- OUTPUT_IF (TS_orig_pair);
- /* Output raw CR so kernel can track the cursor hpos. */
- /* But on magic-cookie terminals this can erase an end-standout marker and
- cause the rest of the frame to be in standout, so move down first. */
- if (TN_standout_width >= 0)
- cmputc ('\n');
- cmputc ('\r');
+ if (TN_standout_width < 0)
+ turn_off_highlight ();
+ turn_off_insert ();
+ OUTPUT_IF (TS_end_keypad_mode);
+ OUTPUT_IF (TS_cursor_normal);
+ OUTPUT_IF (TS_end_termcap_modes);
+ OUTPUT_IF (TS_orig_pair);
+ /* Output raw CR so kernel can track the cursor hpos. */
+ /* But on magic-cookie terminals this can erase an end-standout
+ marker and cause the rest of the frame to be in standout, so
+ move down first. */
+ if (TN_standout_width >= 0)
+ cmputc ('\n');
+ cmputc ('\r');
+ }
+ else if (reset_terminal_modes_hook)
+ (*reset_terminal_modes_hook) ();