MCPcopy Create free account
hub / github.com/gwsw/less / make_display

Function make_display

command.c:718–747  ·  view source on GitHub ↗

* Make sure the screen is displayed. */

Source from the content-addressed store, hash-verified

716 * Make sure the screen is displayed.
717 */
718 static void
719make_display(VOID_PARAM)
720{
721 /*
722 * If nothing is displayed yet, display starting from initial_scrpos.
723 */
724 if (empty_screen())
725 {
726 if (initial_scrpos.pos == NULL_POSITION)
727 jump_loc(ch_zero(), 1);
728 else
729 jump_loc(initial_scrpos.pos, initial_scrpos.ln);
730 } else if (screen_trashed)
731 {
732 int save_top_scroll = top_scroll;
733 int save_ignore_eoi = ignore_eoi;
734 top_scroll = 1;
735 ignore_eoi = 0;
736 if (screen_trashed == 2)
737 {
738 /* Special case used by ignore_eoi: re-open the input file
739 * and jump to the end of the file. */
740 reopen_curr_ifile();
741 jump_forw();
742 }
743 repaint();
744 top_scroll = save_top_scroll;
745 ignore_eoi = save_ignore_eoi;
746 }
747}
748
749/*
750 * Display the appropriate prompt.

Callers 3

promptFunction · 0.85
forw_loopFunction · 0.85
commandsFunction · 0.85

Calls 5

empty_screenFunction · 0.85
jump_locFunction · 0.85
reopen_curr_ifileFunction · 0.85
jump_forwFunction · 0.85
repaintFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…