about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* regex: re-work compileSearchRegexbptato2024-02-1711-82/+139
| | | | | | | I've gotten tired of not being able to search for forward slashes. Now it works like in vim, and you can also set default ignore case in the config.
* term: fix coloring messbptato2024-02-176-48/+208
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, the config file required manual adjustment for the output to look bearable on terminals colored differently than {bgcolor: black, fgcolor: white}. Also, it only detected RGB when COLORTERM was set, but this is not done by most (any?) terminal emulators (sad). To improve upon the situation, we now query the terminal for some attributes on startup: * OSC(10/11, ?) -> get the terminal's bg/fgcolor * DCS(+, q, 524742) -> XTGETTCAP for the "RGB" capability (only supported by a few terminals, but better than nothing) * Primary device attributes -> check if ANSI colors are supported, also make sure we don't block indefinitely even if the previous queries fail If primary device attributes does not return anything, we hang until the user types something, then notify the user that something went wrong, and tell them how to fix it. Seems like an OK fallback. (The DA1 idea comes from notcurses; since this is implemented by pretty much every terminal emulator, we don't have to rely on slow timing hacks to skip non-supported queries.)
* ua.css: remove inline-block from tt, var, font, u, s, strikebptato2024-02-171-1/+1
| | | | It's inconsistent with other browsers' default stylesheets.
* winattrs: remove unnecessary call, fix height_px fallbackbptato2024-02-173-6/+6
| | | | no need for every new buffer to query the window size
* css: reduce CSSComputedValue sizebptato2024-02-172-118/+96
| | | | | | | The `t' field was completely redundant, as it's already included in the CSSComputedValues index. + removed some unused functions
* More bgcolor fixesbptato2024-02-171-10/+7
| | | | | | * fix accidental dependency on previously chosen bgcolor (ouch) * also draw empty background boxes for bgcolor-is-canvas boxes * remove unused variable
* layout: use html/body bgcolor as canvas bgcolorbptato2024-02-176-46/+74
| | | | | | This is required by the standard. (Without this, lots of websites have incorrect background colors, because they set the body height to 100% of the viewport.)
* layout: only reset charwidth on non-word atomsbptato2024-02-161-1/+1
| | | | | | | | charwidth is specifically intended to represent the width of all characters until the current one, so resetting it for words makes no sense. Originally it was reset for all atoms *except* words; 9fdea97d simplified the code incorrectly (flipped the logic) and thus introduced a regression.
* container: set color on double width char + tab fillersbptato2024-02-161-7/+10
|
* layout: avoid wrapping on dash inside double-width linesbptato2024-02-161-0/+4
| | | | | Without this we were wrapping on the last dash (if any) inside CJK sentences.
* gmifetch: clean up globalsbptato2024-02-161-30/+21
|
* gmifetch: set port separatelybptato2024-02-161-17/+15
|
* gmifetch: clean up URL handlingbptato2024-02-162-124/+91
| | | | | | extract_hostname is no more, hooray. + add standard error reporting
* so close!bptato2024-02-151-5/+7
| | | | but I forgot to ensure the output stream gets closed. :(
* loader: fix crash on file redirection inputsbptato2024-02-152-16/+60
| | | | | | | | cha -d <some-file was crashing loader, because it was trying to register the regular file in the selector. this patch fixes the problem, but the control flow of loader looks like spaghetti now
* pager: increase numload for stdinbptato2024-02-151-0/+1
| | | | otherwise pages from stdin have a race condition in dump
* dom: fix href stringifierbptato2024-02-151-0/+2
| | | | Return the empty string if it's unset.
* 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
|