mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
fix visible lines expiring from cache
This commit is contained in:
parent
67aa2baf62
commit
04b914dcb0
@ -1494,12 +1494,18 @@ static int line_cache_check_remove(void *key, LINE_CACHE_REC *cache,
|
|||||||
static int sig_check_linecache(void)
|
static int sig_check_linecache(void)
|
||||||
{
|
{
|
||||||
GSList *tmp, *caches;
|
GSList *tmp, *caches;
|
||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
now = time(NULL); caches = NULL;
|
now = time(NULL);
|
||||||
|
caches = NULL;
|
||||||
for (tmp = views; tmp != NULL; tmp = tmp->next) {
|
for (tmp = views; tmp != NULL; tmp = tmp->next) {
|
||||||
TEXT_BUFFER_VIEW_REC *rec = tmp->data;
|
TEXT_BUFFER_VIEW_REC *rec = tmp->data;
|
||||||
|
|
||||||
|
if (rec->window != NULL) {
|
||||||
|
/* keep visible lines mapped */
|
||||||
|
view_get_lines_height(rec, rec->startline, rec->subline, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (g_slist_find(caches, rec->cache) != NULL)
|
if (g_slist_find(caches, rec->cache) != NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1509,7 +1515,7 @@ static int sig_check_linecache(void)
|
|||||||
&now);
|
&now);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free(caches);
|
g_slist_free(caches);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user