Beispiel #1
0
static void windows_invalidate(Vis *vis, size_t start, size_t end) {
	for (Win *win = vis->windows; win; win = win->next) {
		if (vis->win != win && vis->win->file == win->file) {
			Filerange view = view_viewport_get(win->view);
			if ((view.start <= start && start <= view.end) ||
			    (view.start <= end && end <= view.end))
				view_draw(win->view);
		}
	}
	view_draw(vis->win->view);
}
Beispiel #2
0
static void editor_windows_invalidate(Editor *ed, size_t start, size_t end) {
	for (Win *win = ed->windows; win; win = win->next) {
		if (ed->win != win && ed->win->file == win->file) {
			Filerange view = view_viewport_get(win->view);
			if ((view.start <= start && start <= view.end) ||
			    (view.start <= end && end <= view.end))
				win->ui->draw(win->ui);
		}
	}
	ed->win->ui->draw(ed->win->ui);
}