From 1d0ba25a660483da1272a31dd077ed94441e3d9f Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sat, 2 Jan 2021 09:20:37 +0900 Subject: New upstream version 0.5.3+git20210102 --- buffer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'buffer.c') diff --git a/buffer.c b/buffer.c index 5afc26a..e70cffe 100644 --- a/buffer.c +++ b/buffer.c @@ -47,6 +47,8 @@ newBuffer(int width) #ifdef USE_M17N n->auto_detect = WcOption.auto_detect; #endif + n->check_url = MarkAllPages; /* use default from -o mark_all_pages */ + n->need_reshape = 1; /* always reshape new buffers to mark URLs */ return n; } @@ -705,6 +707,7 @@ readBufferCache(Buffer *buf) cache = fopen(buf->savecache, "r"); if (cache == NULL || fread1(clnum, cache) || fread1(tlnum, cache)) { + fclose(cache); buf->savecache = NULL; return -1; } @@ -760,8 +763,10 @@ readBufferCache(Buffer *buf) } #endif } - buf->lastLine = prevl; - buf->lastLine->next = NULL; + if (prevl) { + buf->lastLine = prevl; + buf->lastLine->next = NULL; + } fclose(cache); unlink(buf->savecache); buf->savecache = NULL; -- cgit v1.2.3