| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
more intuitive than shoehorning it into "view image"
(also makes it easier to apply the content type)
|
|
|
|
| |
ok I'll use result, whatever
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly compatible with other browsers/tools that follow the
Netscape/curl format.
Cookie jars are represented by prepending "jar@" to the host part, but
*only* if the target jar is different than the domain. Hopefully, other
software at least does not choke on this convention. (At least curl
seems to simply ignore the entries.)
Also, I've moved cookies.nim to config so that code for local files
parsed at startup remains in one place.
|
| |
|
| |
|
|
|
|
| |
Now screen.width etc. works in the pager too.
|
|
|
|
|
|
|
|
|
| |
Looking at it closer, this never actually did what it advertised to do.
It only affected first-party cookies from subdomains, but that has been
fixed; third-party cookies were never supported in the first place.
(In fact, even first-party cookies are still skipped unless directly
received on navigation. This should probably be fixed.)
|
|
|
|
|
| |
If the image has an offx or offy, then it means it is partially outside
the screen, so its offx2/offy2 is already accounted for.
|
|
|
|
| |
Also fixes the -O option.
|
|
|
|
| |
toJS is generally more efficient
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix luwrap comparison function
* strip high unicode controls in term/pager
* use wcwidth in dirlist2html
* remove combining category from strwidth
* remove unused "disallowed" field from lineedit
My initial goal with switching to wcwidth in dirlist2html was just to
get rid of the outdated combining map in charwidth_gen. Then I realized
that layout will normalize those out anyway, so we don't actually have
to deal with them anywhere.
Also, I found a few bugs in the process; high unicode control chars not
being stripped out was a particularly bad one, as it allows for pages to
mess up the terminal output. (Easiest way to replicate: just open a
random binary file without this patch.)
|
|
|
|
|
| |
It's still missing a "color visited links" feature, but it's better
than nothing.
|
| |
|
|
|
|
| |
doing it manually is too error prone
|
| |
|
|
|
|
| |
this broke saveImage
|
| |
|
|
|
|
|
|
|
|
| |
Inspired by Dillo. (Just the movement mechanism; Dillo doesn't hide the
context menu on double click, but we still do.)
Also, we now disable highlighting of menu items when the mouse is
hovering outside.
|
|
|
|
|
| |
Always override Expires with Max-Age, but never the other way (as per
spec.)
|
| |
|
|
|
|
|
| |
Whether this works or not still depends on many variables, but it
should be enough in most cases.
|
|
|
|
|
| |
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
|