about summary refs log tree commit diff stats
path: root/src/config
Commit message (Collapse)AuthorAgeFilesLines
...
* twtstr: remove tolower, isWhitespacebptato2023-11-202-5/+6
| | | | | | | | * tolower: strutils toLowerAscii is good enough for the cases where we need it. Also, it's easy to confuse with unicode toLower and vice versa. * isWhitespace: in AsciiWhitespace is more idiomatic. Also has a naming collision with unicode toLower.
* Add -C optionbptato2023-10-271-6/+9
|
* toml: fix dquote escapingbptato2023-10-261-1/+1
|
* reduce new() usagebptato2023-10-251-2/+2
|
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-1/+10
|
* container: add cursorNthLink, cursorRevNthLinkbptato2023-10-141-1/+1
|
* config: fix `include` namingbptato2023-10-091-4/+4
| | | | use what is documented
* Add w3m-cgi-compat optionbptato2023-10-011-1/+3
|
* Use twtstr.join everywherebptato2023-10-011-2/+2
|
* Add urimethodmap supportbptato2023-09-301-19/+31
| | | | yay
* loader: add local-cgibptato2023-09-301-1/+4
| | | | | | | | | | | Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart
* toml: fix bug in multiline string parsingbptato2023-09-251-0/+5
|
* config: add missing \nbptato2023-09-201-1/+1
|
* Accept bare strings in -o, fix -o with missing newlinebptato2023-09-202-14/+80
| | | | | | | | * Bare strings are now allowed when specifying config options through -o. * Fix a bug where options specified with -o would be disregarded unless a newline was included. * (Also, add a TOML stringifier routine for debugging.)
* mailcap: fix regressionbptato2023-09-161-1/+1
| | | | not that this code path is ever executed
* mailcap: unquoteCommand improvements/fixesbptato2023-09-161-34/+57
| | | | | | | | * quote substituted URLs, mime types and named attributes too * change quote state: now we use a stack of quote states, new states are pushed/popped when a process substitution is encountered * fix named attribute state (it was incomplete) * remove superfluous tolower statements
* mailcap: allow whitespace after subtypebptato2023-09-161-1/+1
|
* move around more modulesbptato2023-09-143-5/+5
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* toml: fix underscore number separatorbptato2023-09-131-1/+1
| | | | | | Underscores should not be added to repr. Also, was_num should only start as true if the first character is a number, and must be true after the while loop.
* fix compile errorbptato2023-09-131-1/+1
| | | | aaaaaa
* toml: simplifybptato2023-09-131-4/+2
| | | | I meant to put this in the previous commit
* toml: fix bugs in parseNumberbptato2023-09-131-12/+15
| | | | | The input c was not considered, so positive/negative/non-decimal number parsing was incorrect.
* toml: do not stream inputbptato2023-09-131-4/+1
| | | | | | | | | It is more efficient to just read the whole file into memory than to... read the whole file into memory, but one piece at a time, while calling the rather slow readLine function for each chunk. (Also, configuration files are rather small, so even a proper streaming implementation would be pointless.)
* toml: add support for hex/octal numbersbptato2023-09-131-9/+45
|
* Add vi-style numeric prefixes, make gotoLine 1-basedbptato2023-09-081-0/+4
| | | | | | | | * it is now possible to jump to the nth line by typing {n}G * gotoLine is now 1-based, so to go to the first line you would use pager.gotoLine(1) * it is now allowed to return a function from a keybinding (which will be subsequently executed as a regular keybinding)
* toml: complain more on unexpected EOFbptato2023-09-071-2/+3
|
* toml: remove unused importbptato2023-09-071-1/+0
|
* toml: fix newline counting in multiline stringsbptato2023-09-071-2/+4
| | | | also, replace the todo comment
* loader: add data URLsbptato2023-09-011-1/+6
|
* Add jsdelprop, allow deletion of ActionMap propsbptato2023-08-291-0/+6
| | | | mostly for symmetry with real objects
* Add jssetprop, make ActionMap editable from JSbptato2023-08-291-18/+20
| | | | | | | | | jssetprop just adds the set_property exotic function. ActionMap is now editable from JS; the setter is implemented in the same way as bindPagerKey/bindLineKey. (In fact, now those two just call the setter.) But this is still rather inefficient and subject to change.
* javascript: refactorbptato2023-08-281-2/+3
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* javascript: de-ref some interfacesbptato2023-08-281-7/+16
| | | | | | | Also, make ActionMap use getters/hasprop instead of a table copy. peakmem remains up +200M at 950M after commit 9991bd3393483158ab0d1b9d995f695dee3c65dc. :(
* config: allow modification through JSbptato2023-08-271-44/+59
| | | | | | | This used to be possible until I moved everything under separate headers to their respective objects. Now it works again, mostly; modification of some attributes is still missing.
* mailcap: fix newline parsingbptato2023-08-261-1/+1
| | | | skipBlanks should not consume newlines.
* config: fix overriding default headersbptato2023-08-262-26/+27
| | | | | * simplify ActionMap reading * introduce separate case for Table
* Allow overriding default headersbptato2023-08-261-10/+4
|
* toml: various fixesbptato2023-08-261-8/+11
| | | | | * Increase line counter on newline in array & inline table parsing * Fix broken inline table parsing
* toml: fix quotation chars in multiline stringsbptato2023-08-191-7/+9
|
* Move charsets into chakasubptato2023-08-142-2/+4
| | | | Operation "modularize Chawan somewhat" part 1
* mimetypes: small optimizationbptato2023-08-131-2/+1
|
* Simplify mailcap entry matchingbptato2023-08-131-25/+14
|
* Do not replace existing mime typesbptato2023-08-131-1/+2
| | | | | Make mime.types behavior consistent with mailcap: that is, the *first* match counts.
* Add mailcap, mime.types & misc refactoringsbptato2023-08-133-12/+441
| | | | | | | | * add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-011-1/+1
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* Add default background/foreground color overridebptato2023-07-291-0/+11
|
* Add compileMatchRegexbptato2023-07-251-4/+4
| | | | | | | This makes it so that host = 'example\.org' mandates an exact match, but host = '^example' matches example.org, example.com, etc. (Previously, 'example\.org' would have matched exampleexample.org as well, which was quite counter-intuitive.)
* Add proxy supportbptato2023-07-041-2/+22
|
* return Result[T, JSError] from fromJSbptato2023-07-021-6/+4
|
* Factor out headers into separate modulebptato2023-07-011-1/+1
|