about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* buffersource: remove location fieldbptato2024-02-124-31/+33
|
* io: remove multistream, teestreambptato2024-02-122-74/+0
| | | | unused (hopefully forever)
* Add pager.externFilterSourcebptato2024-02-125-16/+85
| | | | 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
|
* 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-111-25/+11
| | | | | | | * 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-095-143/+153
| | | | | | * 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-081-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.
* loader: fix eagain in fetch, only add URL to handle in debugbptato2024-02-082-7/+12
| | | | | | * eagain was causing fetch to add unnecessary null bytes to input streams * URL is now only added to handles in debug mode
* dom: reduce todosbptato2024-02-081-10/+20
| | | | | * enumize insertAdjacentHTML position * un-extern attrs
* js: fix fromJSEnumbptato2024-02-082-6/+17
| | | | std enum parsing uses Nim ident matching rules, which is incorrect here.
* chadombuilder: remove unnecessary pragmabptato2024-02-081-1/+1
|
* dom: enumize attribute namesbptato2024-02-088-206/+338
|
* dom: atomize id, name, DOMTokenListbptato2024-02-083-103/+162
|
* dom: reduce tagType usebptato2024-02-084-70/+46
| | | | | tagType is now a function call, but usually it's enough to just test for the object type.
* Update chamebptato2024-02-071-1/+1
|
* Fix some document.write bugsbptato2024-02-072-44/+88
|
* Incremental renderingbptato2024-02-077-224/+389
| | | | | | | | | | | | Yay! Admittedly, it is not very useful in its current form, except maybe on very slow networks. The problem is that renderDocument is *slow*, so we only run it when onload fails to consume all bytes from the network in a single pass. Even then, we are guaranteed to get a FOUC, since CSS is only downloaded in finishLoad(). Well, I think it's cool, anyway.
* Update chamebptato2024-02-0711-611/+1087
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* regex: fix 8-bit narrow strings in JSbptato2024-02-051-1/+1
| | | | | The previous approach to add UTF-8 support to libregexp was broken. This time, we use a separate flag (cbuf_len == 3) to indicate UTF-8 input.
* pager: display precnum *and* inputBuffer when precnum != 0bptato2024-02-011-3/+1
| | | | Previously we were overwriting it, and that looked a little strange.
* toml: misc refactoringsbptato2024-01-301-71/+40
|
* toml: allow EOF in values with laxnamesbptato2024-01-301-0/+2
| | | | Useful for clearing settings with -o
* config: append */* rule instead of prependingbptato2024-01-302-11/+3
| | | | | | + actually use the result. Fixes default converters when no external mailcap exists.
* Add default md2html converterbptato2024-01-301-14/+21
|
* Add command to yank link under cursor (yc)bptato2024-01-291-0/+6
|
* js: always use var destructorbptato2024-01-291-8/+2
| | | | See https://forum.nim-lang.org/t/10807
* layout: more consistent namingbptato2024-01-291-79/+41
|
* layout: consider inline positioning for absolute blocksbptato2024-01-293-78/+102
| | | | | When an absolute block is a descendant of an inline box, its positioned ancestor must be set to that box.
* forkserver: clean upbptato2024-01-295-30/+24
| | | | | Move forkBuffer into forkserver (why was it in container anyway), remove unused mainproc variable, etc.
* client: stop entire process group on suspend()bptato2024-01-291-1/+1
| | | | | * pass 0 so e.g. git does not hang * use sigtstp so e.g. cgi scripts can clean up if needed
* mimetypes: simplify parseMimeTypesbptato2024-01-272-16/+15
| | | | | * use functions like until * do not call atEnd for every line, use boolean readLine instead