diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-17 00:20:34 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-17 00:20:34 +0100 |
commit | ab27cec1f9951b5b6d03cecb8a4a9e65e0258390 (patch) | |
tree | 6d8edd102bceff7fa079a587b534f2221b988a46 /src | |
parent | 7fd73dff220f7dd5075884059f1c4edc88036813 (diff) | |
download | chawan-ab27cec1f9951b5b6d03cecb8a4a9e65e0258390.tar.gz |
pager: fix buffer filtering
Diffstat (limited to 'src')
-rw-r--r-- | src/local/pager.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim index 6d748992..f82a9f93 100644 --- a/src/local/pager.nim +++ b/src/local/pager.nim @@ -1278,7 +1278,8 @@ proc externInto(pager: Pager, cmd, ins: string): bool {.jsfunc.} = proc externFilterSource(pager: Pager; cmd: string; c: Container = nil; contentType = opt(string)) {.jsfunc.} = let fromc = if c != nil: c else: pager.container - let contentType = contentType.get(pager.container.contentType.get("")) + let fallback = pager.container.contentType.get("text/plain") + let contentType = contentType.get(fallback) let container = pager.newContainerFrom(fromc, contentType) container.ishtml = contentType == "text/html" pager.addContainer(container) @@ -1469,7 +1470,8 @@ proc filterBuffer(pager: Pager; stream: SocketStream; cmd: string; connect: true, fdout: response.body.fd, ostreamOutputId: response.outputId, - ishtml: ishtml + ishtml: ishtml, + found: true ) # Search for a mailcap entry, and if found, execute the specified command |