Пример #1
0
/* Performs postponed updates for the view, if any.  Returns non-zero if
 * something was indeed updated, and zero otherwise. */
static int
process_scheduled_updates_of_view(FileView *view)
{
	if(!window_shows_dirlist(view))
	{
		return 0;
	}

	switch(ui_view_query_scheduled_event(view))
	{
		case UUE_NONE:
			/* Nothing to do. */
			return 0;
		case UUE_REDRAW:
			redraw_view_imm(view);
			return 1;
		case UUE_RELOAD:
			load_saving_pos(view, 1);
			if(view == curr_view && !is_status_bar_multiline())
			{
				ui_ruler_update(view);
			}
			return 1;
		case UUE_FULL_RELOAD:
			load_saving_pos(view, 0);
			return 1;

		default:
			assert(0 && "Unexpected type of scheduled UI event.");
			return 0;
	}
}
Пример #2
0
/* Performs postponed updates for the view, if any. */
static void
process_scheduled_updates_of_view(FileView *view)
{
	if(window_shows_dirlist(view))
	{
		/* Order of calls matters as reloading resets redraw request. */

		if(ui_view_is_reload_scheduled(view))
		{
			load_saving_pos(view, !ui_view_is_full_reload_scheduled(view));
		}

		if(ui_view_is_redraw_scheduled(view))
		{
			redraw_view_imm(view);
		}
	}
}