about summary refs log tree commit diff stats
path: root/src/buffer
Commit message (Collapse)AuthorAgeFilesLines
* container: accept numbers in cursorLeft, cursorRight, etc.bptato2023-09-091-8/+8
| | | | | | These functions now take a numeric argument to determine how many cells/lines to move. Also, update the default config so e.g. 9j now works.
* buffer: remove url referencebptato2023-09-091-2/+3
| | | | The same reference is already stored in BufferSource as location.
* add extern, refactor some term functionsbptato2023-09-091-0/+5
| | | | | | | | | | | * Add an extern() call. Maybe it should be defined on client. It certainly should accept a dictionary instead of the enum type we use now. Perhaps it should return the error code? I'll leave it undocumented until I figure this out. * Refactor enableRawMode, unblockStdin, etc. so that they operate on the term object instead of global state. * Move editor to a separate folder, and factor out runprocess into a different module.
* Add vi-style numeric prefixes, make gotoLine 1-basedbptato2023-09-081-6/+5
| | | | | | | | * 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)
* container: add separate commands for 0 and ^bptato2023-09-081-0/+9
| | | | | Just as in vi, 0 puts the cursor at the beginning of the current line, and ^ puts the cursor at the position of the first non-blank character.
* cell: remove old hackbptato2023-09-081-4/+0
| | | | looks like the compiler can now deal with this by itself.
* buffer.click: implement preventDefaultbptato2023-09-081-8/+16
|
* container: remove strformat dependencybptato2023-09-071-2/+4
|
* container: remove attrsbptato2023-09-071-3/+0
| | | | It was unused; we just set the width and height instead.
* buffer: run JS jobs on connected/read/errorbptato2023-09-011-0/+6
| | | | | | Not exactly the cleanest solution, but it should work for now. (Ideally it would only be called once after the select IF any of the three occurred on a fetchable file descriptor.)
* buffer: add javascript: URL supportbptato2023-09-011-3/+39
| | | | | | | | | Caveats: * only works in buffers, no navigation yet * converts the output result into a data URL, but data URLs are not supported yet... If JS is disabled, we simply do nothing.
* buffer: fix repaint on click eventsbptato2023-08-311-1/+2
|
* buffer: basic click event supportbptato2023-08-311-4/+48
| | | | | | | Mostly a proof of concept. Just bubble it unconditionally for now and never prevent default. Also, fix fromJSFunction by Dup'ing its closure JSValue.
* refactor: Result[T, JSError] -> JSResult[T]bptato2023-08-281-2/+2
|
* javascript: refactorbptato2023-08-281-1/+1
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* Move HTML parsing into Chamebptato2023-08-151-1/+2
| | | | Operation "modularize Chawan somewhat" part 2
* Move charsets into chakasubptato2023-08-141-2/+3
| | | | Operation "modularize Chawan somewhat" part 1
* Add mailcap, mime.types & misc refactoringsbptato2023-08-132-77/+167
| | | | | | | | * 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
* Fix double line bug in dump modebptato2023-07-291-2/+2
|
* Buffer search fixes & improvementsbptato2023-07-111-17/+26
| | | | | * Fix race condition in updateReadLineISearch * Disable reshape during isearch
* buffer: fix textarea regressionbptato2023-07-101-2/+6
| | | | | Fix bug of not setting focus on clicked text area elements, which would result in the input text being discarded.
* htmlparser: decouple from DOMbptato2023-07-091-1/+1
| | | | | Instead of directly appending nodes to the DOM, use a DOMBuilder interface.
* select: simplify popCursorPos()bptato2023-07-061-3/+1
|
* Add popup menu for select elementbptato2023-07-053-135/+611
| | | | | | | Replaces the weird CSS implementation we have had until now with a searchable popup menu similar to that of w3m. (The previous implementation broke on websites that do not expect <select> to expand on click, had no separate search, and was ugly.)
* Do not conditionally disable CastSizesbptato2023-07-031-6/+1
| | | | ...because that doesn't work at all.
* Fix JS type conversion regressionsbptato2023-07-031-3/+6
|
* Fix CastSize warningsbptato2023-07-031-2/+4
| | | | Introduced by 1.6.14. Warns of undefined behavior.
* FormData fixesbptato2023-07-021-1/+1
|
* use =destroy instead of finalizersbptato2023-07-011-0/+2
| | | | | This should help with moving to ORC in the future. (Also, finalizers do not work very well in the first place.)
* Add window.locationbptato2023-06-291-1/+5
| | | | Note: setters do not work yet.
* Support 8-bit output colorsbptato2023-06-261-30/+23
|
* buffer: only load images if config allows itbptato2023-06-251-1/+4
|
* cookie: return error on invalid domainbptato2023-06-251-2/+2
|
* Improve broken cookie handling, add multipart to formbptato2023-06-252-4/+5
| | | | | | | | Now it's not as horribly broken as before (but it's still far from perfect). We can at least log in to sr.ht (hooray). The form multipart part is straightforward, just pass what we used to pass long ago before I broke multipart.
* Do not allow text() twice, etc...bptato2023-06-201-14/+17
|
* Reject fetch promise on network errorbptato2023-06-191-12/+17
| | | | Instead of setting the non-standard res variable.
* Get rid of the .jserr pragmabptato2023-06-191-11/+9
|
* Rework JS exception systembptato2023-06-192-15/+26
| | | | | Now we use Result for passing exceptions to JS. As a result, we can finally get rid of the .jserr pragma.
* Cleanups & bug fixes involving promisesbptato2023-06-151-6/+13
| | | | | Now a promise returning nil doesn't just leave the rest of the then chain hanging. Hooray.
* Make Result.text, json return promisebptato2023-06-131-4/+2
|
* Fix various layout bugs, prepare for image supportbptato2023-06-121-24/+46
|
* Fix some type confusion with colors, fix crash in pagerbptato2023-06-091-153/+131
|
* Fix 'F' missing from fullwidth chars + display bugsbptato2023-06-091-0/+1
|
* Add support for visibilitybptato2023-06-071-18/+15
|
* Add support for width, height media querybptato2023-06-071-4/+6
|
* Add XTERM title renamingbptato2023-06-071-2/+2
|
* Clean up stream error handlingbptato2023-06-071-6/+6
| | | | | | * sread now raises EOFError if readData returns too few bytes * buffer handleError ignores unregistered fds like client * client handleError ignores unregistered fds like buffer
* buffer: call handleError before handleRead & miscbptato2023-06-051-6/+6
|
* Add support for canvas and multipartbptato2023-06-051-82/+28
| | | | | | | | | | | | | | | Quite incomplete canvas implementation. Crucially, the layout engine can't do much with whatever is drawn because it doesn't support images yet. I've re-introduced multipart as well, with the FormData API. For the append function I've also introduced a hack to the JS binding generator that allows requesting the JSContext pointer in nim procs. Really I should just fix the union generator thing and add support for overloading. In conclusion, for now the only thing canvas can be used for is exporting it as PNG and uploading it somewhere. Also, we now have PNG encoding and decoding too. (Now if only we had sixels as well...)
* Fix more config inconsistenciesbptato2023-06-011-1/+1
| | | | So that the default config actually works again. Also some doc updates.