about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update Chagashi HEAD masterbptato2024-10-052-10/+1
|
* layout: fix floats overriding margin/paddingbptato2024-10-051-2/+3
|
* dynstream: fix memory leakbptato2024-10-042-4/+6
| | | | now I know why overloading dealloc felt wrong
* sixel, term: reduce half-dump special casingbptato2024-10-043-22/+37
| | | | | | | Makes it slightly easier to debug image output. Also, we stop sending dimension headers, and no longer check for the scheme env var to make CLI invocation a bit less annoying.
* sixel: transparency improvementsbptato2024-10-031-4/+4
| | | | | | | * don't set transparency when raster attributes suffice - it seems terminals don't background-fill in that case either. * fix transparency in encoder standalone mode * update comments
* Update monouchabptato2024-10-021-1/+1
|
* poll: reset events on errorbptato2024-10-021-1/+5
| | | | | poll will return an error if interrupted, which may leave the events in their previous state. Make sure revents is set to 0 first.
* term: "fix" GNU screen not respecting query sequence orderbptato2024-10-011-9/+22
| | | | | | | | | | | | | wtf ... OK, it's a "fix" as much as you can fix this. I'm not adding a timer just to work around screen silently reordering my output. (Who thought this would be a good idea??) Unfortunately, this means that your background/foreground colors won't get detected when using screen. Not that they would have been until now.
* twtstr: misc refactoringsbptato2024-10-013-5/+5
|
* loader: add missing nil check in openCachedItembptato2024-10-011-1/+4
| | | | also, erase cacheRef when it couldn't be opened
* url: fix searchParams.deletebptato2024-09-301-0/+1
|
* pager: improve rewrite-url semanticsbptato2024-09-301-7/+19
| | | | | | | | | | | | | Previously, it just changed the URL before loading the site; now it's an actual redirect. Technically, the previous behavior was more flexible, because it let you apply siteconf rules exclusively for sites where you redirected from. Practically, this was not very useful, and probably unexpected for anybody trying to use the feature. This also fixes a bug where the loader filter would be set for the original page, so you couldn't switch from https to http, etc.
* timeout: accept err stream as parambptato2024-09-304-16/+11
| | | | | gets rid of a todo. (not sure why I thought this was important, but it sure looks nicer)
* sandbox: allow clock_gettime64bptato2024-09-301-1/+2
| | | | used on 32-bit platforms
* dom: optimize element size, remove importc hack & dead codebptato2024-09-304-111/+85
| | | | | This switches CAtom to uint32; it seems better to use the same size on all platforms.
* pager: add missing nil checkbptato2024-09-291-2/+3
|
* buffer: un-extern some procsbptato2024-09-291-2/+2
|
* Update monouchabptato2024-09-292-1/+2
| | | | | Now we use QuickJS-NG, which is better maintained than QJS and has column tracking.
* promise: move PromiseMap to bufferbptato2024-09-292-72/+51
| | | | | It's only used there, and there's no reason for every single promise to carry two pointers to support it.
* loader: get rid of a pointless tablebptato2024-09-281-18/+26
|
* loader: send headers for tocache requests toobptato2024-09-285-43/+41
| | | | | This lets us send the transparency bit as a header, and also halves the number of header parsers in loader.
* gopher: do not depend on libcurlbptato2024-09-282-1/+13
| | | | | | | | I'm thinking of making libcurl entirely optional; let's start with the easiest part. I've added a SOCKS5 client for ALL_PROXY support; I know curl supported others too, but whatever.
* loader: clean up connecterrorbptato2024-09-282-56/+87
| | | | | | * allow string values for public errors * remove unused errors * update naming
* container: fix control char displaybptato2024-09-287-53/+29
| | | | | | Also, kill twidth and its friends; we haven't been using it for a while now. (In the future, a solution with PUA chars might be worth exploring.)
* container: don't show hover type on ubptato2024-09-271-1/+1
| | | | it's a waste of space, and doesn't work well with showFullAlert
* sandbox: allow restart_syscallbptato2024-09-271-1/+3
| | | | required for poll
* layout: fix wrong padding offsetsbptato2024-09-272-54/+44
| | | | + some misc refactorings
* poll: unset unused fds in registerbptato2024-09-271-0/+3
|
* Fixes for FreeBSDbptato2024-09-263-6/+6
|
* loader, pager: fix fd leaksbptato2024-09-252-0/+5
|
* color: fix a parseLegacyColor bugbptato2024-09-251-5/+6
|
* dynstream: fix mmap bugsbptato2024-09-251-12/+16
| | | | ugh
* buffer: make non-button form-associated elems clickablebptato2024-09-251-3/+2
| | | | | d7085253b7 was too strict; in particular, it broke cases where copyable text is placed in text areas.
* term: prevent negative line damage, fix off by onebptato2024-09-252-9/+9
|
* dom: invalidate shared images on loadbptato2024-09-251-0/+1
| | | | fixes the race where reused images wouldn't show up after page load
* pager: make image ordering deterministicbptato2024-09-252-4/+6
| | | | ensure that images are shown in the order buffer sent them
* sixel: support transparencybptato2024-09-246-24/+34
| | | | | | | | | | | | | | | | | | Sixel can only represent transparency for fully transparent (alpha = 0) and fully opaque (alpha = 255) pixels, i.e. we would have to do blending ourselves to do this "properly". But what do you even blend? Background color? Images? Clearly you can't do text... So instead of going down the blending route, we now just approximate the 8-bit channel with Sixel's 1-bit channel and then patch it up with dither. It does look a bit weird, but it's not *that* bad, especially compared to the previous strategy of "blend with some color which hopefully happens to be the background color" (it rarely was). Note that this requires us to handle transparent images specially in term. That is, for opaque ones, we can leave out the "clear cells affected by image" part, but for transparent ones, we must clear the entire image every time.
* select: use a separate module (again)bptato2024-09-244-351/+374
| | | | | | | | | Now we dispatch to select objects from the pager object too, just to make things even more confusing. Well, it works better than the previous arrangement, in that trying to use unimplemented movements now just throws instead of moving around the container. Yay for OOP (?)
* pager: fix double-width overprint & reload blank screen bugbptato2024-09-242-8/+17
| | | | | * fix overprint of double width chars in status & select * fix blank screen on reload + startpos screen move
* sixel: use inline background for blendingbptato2024-09-246-6/+13
| | | | still not really great, because inline background is a mess too
* buffer: allow button nested in abptato2024-09-241-0/+4
| | | | for compatibility with other browsers...
* Replace std/selectors with pollbptato2024-09-2312-283/+299
| | | | | | | | | | | | std/selectors uses OS-specific selector APIs, which sounds good in theory (faster than poll!), but sucks for portability in practice. Sure, you can fix portability bugs, but who knows how many there are on untested platforms... poll is standard, so if it works on one computer it should work on all other ones. (I hope.) As a bonus, I rewrote the timeout API for poll, which incidentally fixes setTimeout across forks. Also, SIGWINCH should now work on all platforms (as we self-pipe instead of signalfd/kqueue magic).
* client, forkserver, dynstream: misc refactorings, fixesbptato2024-09-237-101/+107
| | | | | | * fix broken int conversion in dynstream * fix EPIPE handling in forkserver * merge fdmap and connectingContainers into loader map
* term: refactorbptato2024-09-233-145/+160
| | | | | * reduce copies & allocations * simplify SGR generation
* loader: mmap intermediate image files, misc refactoringbptato2024-09-2211-89/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor parseHeader * optimize response blob() * add direct "to cache" mode for loader requests which sets stdout to a file, and use it for image processing * move image resizing into a separate process * mmap cache files in between processing steps when possible At last, resize is no longer a part of image decoding. Also, it feels much nicer to keep encoded image data in the same cache as everything else. The mmap operations *should* be more efficient than copying the whole RGBA data through a pipe. In practice, it only makes a difference for loading (well, now just mmapping) the encoded image into the pager, where it singlehandedly speeds up image display by 10x on my test image. For the other steps, the unfortunate fact that "tocache" must delay the next fork/exec in the pipeline until the entire image is processed seems to equal out any wins we might have gotten from skipping a single raw RGBA copy. I have tried moving the delay before the exec (it's possible with yet another pipe), but it didn't help much and made the code much uglier. (Not that tocache didn't, but I can live with this...)
* pager: improve hover text handlingbptato2024-09-223-44/+77
| | | | | | | | | | | * align status truncating behavior with w3m (not exactly, clipping is still different, but this should be fine for now) * add "su" for "show last alert" - w3m's solution here is to scroll one char at a time with "u", but that's extremely annoying to use. We already have a line editor that can navigate lines, so reuse that instead. * fix peekCursor showing empty text * update todo
* client: seqify fdmapbptato2024-09-221-4/+6
|
* layout: remove line-heightbptato2024-09-212-65/+18
| | | | | This was a bad idea that, despite my best efforts, never worked properly.
* twtstr: simplify integer parsingbptato2024-09-211-86/+65
| | | | | | * simplify uint parser * use uint parser for signed ints too (to simplify overflow handling) * use openArray[char] where possible
* toml: fix casingbptato2024-09-211-12/+12
|