about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* pager: enable wait in runMailcapWritePipebptato2024-02-141-1/+1
| | | | | | Otherwise, container will just happily kill the buffer and with it the loader process before it would have had the chance to stream out the input into the external process.
* Update docsbptato2024-02-143-21/+25
|
* res/mime.types: add gmi extensionbptato2024-02-141-0/+1
|
* Various refactorings & fixesbptato2024-02-1413-243/+127
| | | | | | | | * disallow Stream interface usage on non-blocking PosixStreams * do not read estream of forkserver byte-by-byte (it's slow) * do not call writeData with a zero len in formdata * do not quote numbers in mailcap quoteFile * remove some unused stuff
* doc: update npr redirect examplebptato2024-02-141-1/+2
| | | | a bit more readable, and it also works with /[0-9]+ pathnames
* buffer: improve style invalidationbptato2024-02-144-7/+9
|
* buffer: fix regression on htmloutput document baseURLbptato2024-02-141-3/+2
| | | | | readFromFd replacing the base URL of the buffer turns out to be a very bad idea.
* pager: reduce boilerplatebptato2024-02-143-35/+26
| | | | also spawn less processes in some cases
* pager: warn on protocol switching redirectsbptato2024-02-141-4/+16
| | | | TODO should be configurable
* css: hide noscript tags when scripting is enabledbptato2024-02-133-3/+31
|
* config: use `yu` for copying URLsbptato2024-02-132-2/+3
| | | | | | | | | | | It's my mistake; it should have been this way all along. `u` is peek URL, so `yu` should copy the same URL. And of course `c` displays a different URL than what is being copied. Ouch. I would make `yc` copy the current page's URL too (instead of M-y...), but that would make things way too confusing. Maybe sometime in the future, when I unlearn `yc`.
* buffer: skip rewind after the first readbptato2024-02-131-7/+17
| | | | | Speeds up processing of pretty much all documents, because we rarely need to switch the charset after having downloaded the first chunk.
* loader: fix delOutput bug, remove ErrorWouldBlockbptato2024-02-133-28/+15
|
* magnet.cgi: fix quotingbptato2024-02-131-1/+1
|
* loader: fixes & improvementsbptato2024-02-135-176/+125
| | | | | | | | * factor out pushBuffer to make loadFromCache async * fix incorrect cache path * replace rewind with loadFromCache (it does the same thing except actually works) * remove rewindImpl callback, rewind in buffer instead
* buffer: more form fixesbptato2024-02-134-26/+45
|
* buffer: fix wrong click behavior with JSbptato2024-02-131-1/+1
| | | | | do_reshape could move the target element, and thus call click on the wrong clickable.
* container: allow dismissing loadinfobptato2024-02-132-8/+15
| | | | it broke line info in console since it's never fully loaded
* container: do not reshape twice on loading documentsbptato2024-02-121-18/+18
|
* buffer: form fixesbptato2024-02-123-54/+50
| | | | | * show submission URL on hover for all form-associated elements * skip non-checked checkbox/radio inputs
* stricter typingbptato2024-02-121-3/+4
|
* Update todobptato2024-02-121-2/+3
|
* buffersource: remove location fieldbptato2024-02-124-31/+33
|
* io: remove multistream, teestreambptato2024-02-122-74/+0
| | | | unused (hopefully forever)
* config.toml: C-c cancels setMark/gotoMark operationsbptato2024-02-121-3/+21
|
* Add pager.externFilterSourcebptato2024-02-126-19/+109
| | | | useful for filtering stuff through commands like rdrview
* Remove CLONE BufferSource; cache document sources in tmpdirbptato2024-02-1218-338/+443
| | | | | | | | | | | | | | | | | | | | | | | At last all BufferSources are unified. To achieve the same effect as the previous CLONE source type, we now use the "fromcache" flag in Request. This *forces* the document to be streamed from the disk; if the file no longer exists for some reason, an error is returned (i.e. the document is not re-downloaded). For a document to be cached, it has to be the main document of the buffer (i.e. no additional resources requested with fetch()), and also not an x-htmloutput HTML file (for those, the original source is saved). The result is that toggleSource now always returns the actual source for e.g. markdown files, not the HTML-transformed version. Also, it is now possible to view the source of a document that is still being downloaded. buffer.sstream has almost been eliminated; it still exists, but only as a pseudo-buffer to interface with EncoderStream and DecoderStream. It no longer holds the entire source of a buffer at any point, and is cleared as soon as the buffer is completely loaded.
* fix rejection of readFromFd urlsbptato2024-02-111-1/+1
|
* pager: fix discardTreebptato2024-02-111-4/+6
|
* magnet.cgi: use urldec from libexec dirbptato2024-02-111-16/+6
|
* container: fix cursorToggleSelection on double-width charactersbptato2024-02-111-3/+4
|
* layout: skip newlines between full-width charactersbptato2024-02-111-0/+19
| | | | | | Crucially, *only* between full-width characters. So "あ\nあ" is rendered as "ああ", but "あ\na" remains "あ a" (with a space inbetween).
* simplify newLoaderBufferbptato2024-02-111-4/+3
|
* loader: significantly more efficient loadingbptato2024-02-112-98/+137
| | | | | | | | | | The previous version was running the processor on 100% because select would immediately return for writes even when no buffers to send were available. (This has been the case since I added asynchronous sending, but the previous commit put the console buffer's fd in loader too and that made the problem quite obvious.)
* widthconv: bugfixesbptato2024-02-112-26/+14
| | | | | | | * fix failed assertion on non-ha-column half-width chars followed by handakuten with text-transform: full-width * fix dquot full-width conversion * fix lone half-width han/dakuten conversion
* Get rid of LOAD_PIPE BufferSourcebptato2024-02-119-110/+130
| | | | | Instead, use a stream: scheme and associate hostnames with file descriptors directly from the pager.
* loader: add rejectHandlebptato2024-02-101-8/+8
|
* pager: use 644 mask for mailcap temp filesbptato2024-02-101-2/+2
|
* loader: fix teebptato2024-02-104-126/+230
| | | | | | | | | | | | My eyes are bleeding, but at least there is a chance that this does what I wanted. The previous tee implementation mixed buffer and loader fds, so it was fundamentally broken. Also, it used MultiStream which makes asynchronous streaming impossible. This time we use a flat array of output handles and link to them any buffers not written to the target yet.
* loader: fixes & cleanupbptato2024-02-104-73/+55
| | | | | | | | | | | * LoaderHandle.fd is no more, we now check ostream's fd * setBlocking converted to a PosixStream method * SocketStream now sets fd variable * handle sostream/fd redirection properly * fix suspend/resume This fixes non-HTML resource loading, mostly. However, tee is still broken :/
* loader: use recvData instead of readDatabptato2024-02-093-16/+35
| | | | | | | | recvData is a new method for PosixStream that does less weird magic than readData. Also, allow duplicates in unregWrite/unregRead; it's simpler to live with them than to prevent them.
* cgi: do not register closed istreamsbptato2024-02-091-1/+2
|
* twtstr: misc refactoringsbptato2024-02-098-244/+247
| | | | | | * move out half width <-> full width converters * snake_case -> camelCase * improve toScreamingSnakeCase slicing
* buffer: fix index defect in updateHoverbptato2024-02-081-1/+2
| | | | | | Caused by a race condition when updateHover is executed after buffer.lines.len changed in buffer but before the change has been reported to container.
* buffer: use `of' instead of tagTypebptato2024-02-081-1/+1
|
* Update chamebptato2024-02-082-1/+1
|
* loader: fix (another) double-close bugbptato2024-02-081-4/+8
|
* loader: fix memory leakbptato2024-02-081-1/+3
|
* loader: fix double-close bugsbptato2024-02-081-3/+3
|
* buffer: load external resources when they are attachedbptato2024-02-084-103/+133
| | | | | We no longer have to wait for the entire document to be loaded to start loading CSS.