aboutsummaryrefslogtreecommitdiffstats
path: root/buffer.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:37 +0000
committerTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:37 +0000
commit1d0ba25a660483da1272a31dd077ed94441e3d9f (patch)
tree1d8dee52cd1e3d340fe178a8193dc96c4496db84 /buffer.c
parentMerge branch 'cvstrunk' into upstream (diff)
downloadw3m-upstream.tar.gz
w3m-upstream.zip
New upstream version 0.5.3+git20210102upstream/0.5.3+git20210102upstream
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c9
1 files changed, 7 insertions, 2 deletions
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;