| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
now I sort of understand how it works. basically maxh and maxw represent
the inner area occupied by the widget at any time.
|
|
|
|
|
|
|
|
| |
* correct action on M-b
* add external.bookmark option
* move openFileExpand functionality into unquote
* add menu items
* update docs
|
|
|
|
|
|
|
|
| |
Both are quite useful.
readFile and writeFile got a small makeover in error handling; in
particular, readFile now returns null instead of the empty string when
the file is missing and writeFile throws a TypeError on I/O errors.
|
|
|
|
|
|
|
|
| |
Not quite sure why I had assumed that this is broken. At least on XTerm,
the previous behavior definitely was, e.g. with a white-ish background
and white foreground it would end up correcting the contrast to purple
even with black CSS color (thus breaking the "no fgcolor with bgcolor"
assumption anyway.)
|
| |
|
|
|
|
| |
I no longer need it
|
| |
|
|
|
|
| |
we hadn't before, and it's annoying when using cha as a pager
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the past, Chawan would read global mailcap (/etc/mailcap, ...) too,
but every now and then that would run entries that I didn't even know
existed and definitely didn't intend to run. So I changed it to only
use ~/.mailcap, but this meant users now had to add mailcap entries for
every single mime type.
At some point I also changed application/octet-stream to always save to
disk, which is usually nice except when a text file is misrecognized as
binary. Often times I just want to decide myself what to do.
So now there are two layers. First, the global mailcap files (path as
per RFC) prompt before executing. Then there is ~/.chawan/auto.mailcap
(or ~/.config/chawan/auto.mailcap) which runs entries automatically.
If you press shift before selecting an option in the prompt, the
corresponding entry gets copied to auto.mailcap. It's also possible to
type a new entry on the fly. Overall I think it's quite convenient.
One unfortunate side effect is that existing users will have to migrate
their entries to auto.mailcap, or redefine external.auto-mailcap to e.g.
~/.mailcap, but this seems acceptable.
|
| |
|
|
|
|
|
|
| |
isearch feels quite janky in general, and I think there's still a race
lurking here... for now it's ok, but like buffer display, this really
belongs in a state machine (not promises)
|
|
|
|
|
|
|
|
| |
not completely, because that would break the existing API :/
this also fixes the broken interruptHandler - it no longer crashes,
but it's still inefficient... probably it should "just" handle SIGINT
instead
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So I thought this was just a simple z-ordering issue, but silly me,
it's never simple with images. In this case it turns out Kitty can't
really do z-ordering with text the way Sixel can - in short, you must
pick if the image is below text, or above text, but never both.
I imagine you could also get something to work with z=-1 and stretched
1-pixel colored images or some similarly horrifying hack. It seems very
annoying to code and maintain, so I won't.
(In some way this is impressive, because Sixel z-ordering sucks too.
Somehow we got into a situation where both viable image display
protocols are incapable of expressing some useful ways of image
layering, of course in a mutually incompatible way.)
|
|
|
|
|
|
|
|
|
|
| |
* use PosixStream/mmap for mailcap reading too; this finally lets us get
rid of std/streams in the entire codebase
* split up recvDataLoopOrMmap into 3 functions: one that can fall back
to recvAll, one that falls back to recvDataLoop, and one that does not
fall back to anything
* use MAP_PRIVATE in mmap for read (we don't care if changes are
propagated, as we do no changes to cached files)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove std/streams use from mime.types; mmap and parse directly
* use mime.types for inline image extensions
* add some jpeg file extensions
Latter came up because I was trying to add a format locally and it
wouldn't recognize it on images from my file system (i.e. by extension).
As a security measure we still do not allow additional extensions for
predefined inline image types.
|
|
|
|
|
|
|
|
| |
Gets rid of rounding errors when positioning images.
Theoretically this is possible with Sixel too, but as always, it's
ten times as difficult to implement as with Kitty, so I'll leave it
for later.
|
| |
|
| |
|
|
|
|
|
|
|
| |
with buffer.images enabled, we already cache them, so we can skip the
additional request
also, add saveImage, bound to sI
|
|
|
|
|
| |
This couldn't get into system.nim for technical reasons, but it's still
pretty useful when iterating over non-mutable openArrays.
|
| |
|
|
|
|
|
|
|
| |
Useful when an x-htmloutput handler needs styling for the HTML output to
be formatted correctly (as a sort of pseudo-ua style sheet).
ref. https://todo.sr.ht/~bptato/chawan/28
|
|
|
|
| |
this way it works for <select> tags too
|
|
|
|
| |
ref. https://todo.sr.ht/~bptato/chawan/27
|
|
|
|
|
|
| |
eh
probably have to move the event loop to pager...
|
|
|
|
|
| |
* jump to first selected item (if any) when opened
* fix crash on control chars in option (at least they didn't bleed...)
|
|
|
|
| |
one less mystery
|
|
|
|
| |
progress. now they only mess up coloring a bit.
|
| |
|
|
|
|
|
| |
not quite happy with this design but for now let's just try to make
it work well
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's *not* a context menu: items are fixed, and currently not even
customizable. Former is a feature, latter is a bug.
Also, select now has improved mouse support; its behavior is a
combination of the w3m menu (for btn1) and GTK Firefox context menu
(for btn3).
Also, fix some bugs in select:
* lines with double width chars are handled better (not perfectly,
but at least the grid isn't completely mangled anymore)
* non-multiple select now highlights the currently selected option
* small selects at the bottom of the screen are handled correctly
* selects at the right edge of the screen are handled correctly
* select multiple no longer discards selected items on cursorLeft
|
|
|
|
| |
ref. https://todo.sr.ht/~bptato/chawan/24
|
| |
|
|
|
|
|
|
|
| |
It necessarily removes the config.images check from codec access, which
I'm not quite happy about, so I've added a check to the DOM instead.
(TODO: maybe pager should just dynamically grant codec access as a
capability instead? but maybe that's even more error prone...)
|
|
|
|
|
|
| |
* replace weird cursor position representation
* add cursorTop, cursorMiddle, cursorBottom, scrollDown, scrollUp
* expose fromy, cursory to JS
|
| |
|
| |
|
| |
|
|
|
|
| |
this was causing images to disappear sometimes
|
| |
|
|
|
|
|
|
|
| |
most of it has already been moved to monoucha, and the rest fits better
in other directories.
also, move urimethodmap to config
|
|
|
|
|
|
|
| |
Turns out it's more useful to have env vars in the variable than to
allow incomplete path names.
Also, fix the disappearing backslash issue in docs.
|
|
|
|
| |
I swear this feature is cursed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
23beebe6 introduced a regression that broke gotoAnchor. This fixes that,
plus a couple other long-standing gotoAnchor bugs:
* If no anchor is found, do not dupe the buffer.
Desktop browsers still add a history entry, while w3m prints an
error. I've copied the latter because it makes more sense as a user,
but this will have to be refined for the navigation API at some point.
* If the anchor *is* found, then always jump to it, even if it's not
visible.
This was a limitation of relying on the line array, so now we rely on
the box tree instead. (Sooner or later, the former must go anyway.)
Also, fix `U' reload not restoring the position (hopefully this time for
good).
|
| |
|
|
|
|
|
|
|
| |
* query, fragment are now strings, not options
* get rid of Host, Path types, now hostname/pathname are strings
* fix ipv4 parsing error case
* in file protocol, fix URL for dirlist without slash with a redirection
|
|
|
|
|
| |
stopgap measure until I think of a more flexible mouse configuration
method
|
|
|
|
| |
also, default link color is now blue for light terminal backgrounds
|
|
|
|
| |
as much as I wish it weren't, layout *is* css.
|