about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* layout: also round line height for painting backgroundsbptato2024-03-261-3/+2
| | | | | it's pointless to do otherwise, and results in inconsistencies between line positioning and background coloring.
* layout: ensure lines are not higher than they must bebptato2024-03-262-11/+17
| | | | | | This is still a more conservative approach than completely disabling line-height. It seems to work better than preserving rounded line-height in all cases, anyway.
* layout: optimize inline background areasbptato2024-03-261-18/+51
| | | | | | | Instead of adding a new area for every single line, extend already existing areas when possible. (This was my original plan but I got lazy.)
* pager: percent-decode path name in askDownloadPathbptato2024-03-251-1/+1
|
* layout: rework inline box area modelbptato2024-03-253-154/+180
| | | | | | | | | | | | | Specifying the background area as three LayoutUnit pairs sounds clever, but breaks down for text-align: center. * store line Y offset in LineBox - this is necessary to pass down areas we need to paint * refactor addHorizontalLine loop; remove mystery "If necessary, update ictx's width" line that used to be labeled "TODO this seems meaningless" and indeed seems meaningless now (I am prepared to deeply regret this later) * replace broken & convoluted startOffset/endOffset/size with a simple seq of offsets + sizes
* loader: fix failed doRequest handlingbptato2024-03-251-2/+1
| | | | copy-paste error
* buffer: fix getTitle never returning in some casesbptato2024-03-241-0/+2
|
* client, forkserver: remove useless codebptato2024-03-242-2/+0
|
* js: proper distinction between Opt/Optionbptato2024-03-2411-118/+110
| | | | | | | | | | | | | | | | until now, this had very strange (and inconsistent) semantics: * err() was used for exception propagation, but also as a null value * Option accepted undefined as a none value, but not null * Opt and Option were used interchangeably (and mostly randomly) Now, Result is always used for error reporting, and err(nil) means JS_EXCEPTION. (Opt is a special case of Result where we don't care about the error type, and is not used in JS.) Option on the other hand means "nullable variation of normally non-nullable type", and translates to JS_NULL. In JS we mainly use it for turning strings nullable.
* buffer: fix clonebptato2024-03-243-16/+11
|
* cgi: reset SIGCHLD handler in childrenbptato2024-03-241-0/+4
| | | | this was causing problems in git.cgi
* io: derive DynStream from RootObj (not Stream)bptato2024-03-2422-534/+291
| | | | | | | | This way they are no longer compatible, but we no longer need them to be compatible anyway. (This also forces us to throw out the old serialize module, and use packet writers everywhere.)
* pager: detect JS as textbptato2024-03-241-1/+5
| | | | | hack so it's possible to view JS code in a buffer even if it's set as e.g. application/javascript in user mime.types
* bufreader: add initPacketReaderbptato2024-03-243-7/+14
|
* buffer: form fixes & improvementsbptato2024-03-245-86/+130
| | | | | | | * fall back to text for unimplemented input types * add custom prompt to all text-like input types * show min/max for range * fix accidental override of repaint
* io: add bufreaderbptato2024-03-2110-261/+426
| | | | analogous to bufwriter
* config: add default-headers to siteconfbptato2024-03-214-47/+32
| | | | | | | So long as we have to live with siteconf, let's at least make it useful. Also, rewrite the header overriding logic because while it did work, it only did so accidentally.
* term: use termcap for italic resetbptato2024-03-211-3/+7
|
* libregexp: update LRE_FLAG_UTF16 namebptato2024-03-212-2/+2
| | | | upstream now calls it unicode
* cell: update FormatFlag naming, remove useless templatesbptato2024-03-216-57/+45
|
* catom: at -> satbptato2024-03-216-196/+191
| | | | just for consistency
* loader: set static CGI env vars in initLoaderContextbptato2024-03-212-7/+8
| | | | no reason to do it separately in setupEnv
* main: refactor slightlybptato2024-03-212-149/+137
| | | | | | * put forkServer into main() * use a ctx type instead of closures * get rid of types/opt import
* buffer: send title during load + other title stuffbptato2024-03-213-21/+35
| | | | | | | * send title to pager as soon as it's available * expose `title' to DOM * rename undocumented `getTitle' js function to `title' getter in Container
* buffer: also buffer input readsbptato2024-03-213-42/+55
| | | | this is buffer reading from pager
* pager: fix flipped predicate for downloadbptato2024-03-211-1/+1
| | | | we want to check if it's *not* text.
* buffer: also buffer reads for packetsbptato2024-03-202-16/+21
| | | | | Since we know the length of packets, we can also read them in in one call. Though I really wish we could do this without the StringStream.
* client: fix dump detectionbptato2024-03-201-7/+7
| | | | it wouldn't start dump mode if stdout was not a tty but stdin was.
* pager: add "save link", "save source"; change & document some keybindingsbptato2024-03-203-63/+111
| | | | | | | | | * `s{Enter}' now saves link, and `sS' saves source. * Changed ;, +, @ to g0, g$, gc so that it's somewhat consistent with vim (and won't conflict with ; for "repeat jump to char") * Changed (, ) to -, + so that it doesn't conflict with vi's "previous/next sentence" (once we have it...) * Add previously missing keybindings to about:chawan
* pager: do not ask to download text/*bptato2024-03-191-1/+1
| | | | it's text, so we can display it anyway.
* main: set CHA_LIBEXEC_DIR env var at startupbptato2024-03-194-26/+16
| | | | This way, we can use it everywhere (e.g. in mailcap).
* cgi: set cwd to CGI dirbptato2024-03-191-3/+7
| | | | | for w3m and real CGI compatibility; also, it makes more sense than using whatever directory the user happened to be in when starting the browser
* buffer: add markURLbptato2024-03-195-10/+63
| | | | Useful when browsing plaintext files; w3m has it too.
* stylednode: clean up code stylebptato2024-03-181-30/+39
|
* client: refactor inputbptato2024-03-185-167/+159
| | | | | * move mouse handling to term * do not use File for input just to disable buffering anyway
* config: parse mime.types/mailcap/urimethodmap inside parseConfigbptato2024-03-185-104/+76
| | | | | | Better (and simpler) than storing them all over the place. extra: change lmDownload text to match w3m
* pager: remove useless codebptato2024-03-182-16/+1
|
* config: clean up/simplifybptato2024-03-1710-330/+349
| | | | | | | | | * Parse the default config at runtime. There's no significant performance difference, but this makes it much less painful to write config code. * Add better error reporting * Make fromJS2 easier to use * Unquote ChaPaths while parsing config
* Move SIGCHLD ignore call to forkserverbptato2024-03-172-4/+1
| | | | seems like it confuses popen()
* forkserver: set process titles for processesbptato2024-03-172-0/+42
| | | | | this is unfortunately truncated on Linux, but I don't care enough to hack around this
* main: ignore SIGCHLDbptato2024-03-171-0/+4
| | | | to avoid zombies
* client: fix "Hit any key" bug on load failurebptato2024-03-173-21/+45
| | | | it's an unintended side effect that we do not want
* pager: fix buffer filteringbptato2024-03-171-2/+4
|
* io: add BuferedWriterbptato2024-03-168-207/+310
| | | | | | | | | | Unsurprisingly enough, calling `write` a million times is never going to be very fast. BufferedWriter basically does the same thing as serialize.swrite did, but queues up writes in batches before sending them. TODO: give sread a similar treatment
* client, pager: various file saving fixesbptato2024-03-163-18/+22
| | | | | | * do not immediately quit when all containers are gone * fix double saving bug * fix wrong "save to" string
* pager: fix disappearing buffers when reload failsbptato2024-03-161-9/+8
| | | | | we do have logic for this in replace(), but it was not working because setContainer changed the buffer too early.
* container: fall back to text/plain instead of application/octet-streambptato2024-03-162-3/+5
| | | | | | | | | | | | | This has its own problems, but application/octet-stream has the horrible consequence that opening any local file with an unrecognized type automatically quits the browser. (FWIW, w3m also falls back to text/plain, so it's not such an unreasonable default.) The proper solution would be to a) fix the bug that makes the browser auto-quit and b) show a "what to do" prompt for unrecognized file types (and allow users to override it, preferably on a per-protocol basis.)
* pager: simplify line editingbptato2024-03-162-64/+69
| | | | | * embed prompt string into enums * move pager.username to LineDataAuth
* pager, loader: add "Save file to" functionalitybptato2024-03-163-37/+128
| | | | | | | As simple as it could be; no download panel yet. Also, remove the xdg-open default mailcap entry; it's better to just save by default.
* layout: table column size fixesbptato2024-03-161-33/+20
| | | | | | | * remove unnecessarily duplicated code (probably a copy-paste error) * apply UNIT_PERC computed widths for table cells too (just base it on sizes the table receives) * remove unnecessary parameters in some procs