| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
useful for debugging
|
| |
|
|
|
|
|
|
| |
only for source for now, rendered document is a bit more complicated
(also, get rid of useless extern/editor module)
|
|
|
|
|
|
|
| |
* do not use query string for arguments
* accept symlinks as man binaries
* improve error message reporting
* run all regexes on the original line
|
|
|
|
|
| |
we just treat them as img tags. lazy, but works suprisingly well -- so
long as the server sends us a Content-Type, anyway.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depending on Perl just for this is silly.
Now we use libregexp for filtering basically the same things as
w3mman2html did. This required another patch to QuickJS to avoid
pulling in the entire JS engine, but in return, we can now run regexes
without a dummy JS context global variable.
Also, man.nim now tries to find a man command on the system even if it's
not in /usr/bin/man.
|
|
|
|
|
|
| |
* put attrs pointer in state
* simplify width()
* use unsigned int as ptint to avoid UB
|
|
|
|
|
|
|
|
| |
left/right never really worked correctly, is non-standard, and the
only browser that supported it (Firefox) removed it years ago.
bottom was adding the table width to its offset instead of the height,
that is now fixed.
|
| |
|
|
|
|
|
|
|
| |
Split up load into loadSubmit, gotoURL: loadSubmit is a replacement for
load(s + '\n'), and gotoURL is a load that does no URL expansion.
Also, fix a bug where load("\n") would crash the browser.
|
| |
|
| |
|
|
|
|
|
|
| |
* rename buffer enums
* fix isAscii for char 0x80
* remove dead code from URL
|
|
|
|
|
|
|
|
|
| |
Some terminal emulators (AKA vte) refuse to set ws_xpixel and ws_ypixel
in the TIOCGWINSZ ioctl, so we now query for CSI 14 t as well. (Also CSI
18 t for good measure, just in case we can't ioctl for some reason.)
Also added some fallback (optionally forced) config values for width,
height, ppc, and ppl. (This is especially useful in dump mode.)
|
|
|
|
| |
no open/closed logic yet, but at least this fixes the display: property
|
|
|
|
|
|
|
|
|
| |
This was my original intention, but there wasn't a way to do it until
now. The difference is that this respects user-configured color values.
(Now that I think of it, it may be better to automatically detect
prefers-color-scheme based on the default background color, and then use
blue for bright backgrounds and yellow for dark backgrounds. Hmm.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling text/plain as ANSI colored text was problematic for two
reasons:
* You couldn't actually look at the real source of HTML pages or text
files that used ANSI colors in the source. In general, I only want
ANSI colors when piping something into my pager, not when viewing any
random file.
* More importantly, it introduced a separate rendering mode for
plaintext documents, which resulted in the problem that only some
buffers had DOMs. This made it impossible to add functionality
that would operate on the buffer's DOM, to e.g. implement w3m's
MARK_URL. Also, it locked us into the horribly inefficient line-based
rendering model of entire documents.
Now we solve the problem in two separate parts:
* text/x-ansi is used automatically for documents received through
stdin. A text/x-ansi handler ansi2html converts ANSI formatting to
HTML. text/x-ansi is also used for .ans, .asc file extensions.
* text/plain is a separate input mode in buffer, which places all text
in a single <plaintext> tag. Crucially, this does not invoke the HTML
parser; that would eat NUL characters, which we should avoid.
One blind spot still remains: copiousoutput used to display ANSI colors,
and now it doesn't. To solve this, users can put the x-ansioutput
extension field to their mailcap entries, which behaves like
x-htmloutput except it first pipes the output into ansi2html.
|
|
|
|
|
|
| |
default-flags was overly complicated for its purpose.
Also, ignore-case is quite useful, so enable it by default.
|
|
|
|
|
|
| |
The API is horrid :( but at least it copies less.
TODO: think of a better API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, the config file required manual adjustment for the output to
look bearable on terminals colored differently than {bgcolor: black,
fgcolor: white}. Also, it only detected RGB when COLORTERM was set, but
this is not done by most (any?) terminal emulators (sad).
To improve upon the situation, we now query the terminal for some
attributes on startup:
* OSC(10/11, ?) -> get the terminal's bg/fgcolor
* DCS(+, q, 524742) -> XTGETTCAP for the "RGB" capability (only
supported by a few terminals, but better than nothing)
* Primary device attributes -> check if ANSI colors are supported, also
make sure we don't block indefinitely even if the previous queries
fail
If primary device attributes does not return anything, we hang until
the user types something, then notify the user that something went
wrong, and tell them how to fix it. Seems like an OK fallback.
(The DA1 idea comes from notcurses; since this is implemented by pretty
much every terminal emulator, we don't have to rely on slow timing hacks
to skip non-supported queries.)
|
|
|
|
| |
It's inconsistent with other browsers' default stylesheets.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It's my mistake; it should have been this way all along.
`u` is peek URL, so `yu` should copy the same URL. And of course `c`
displays a different URL than what is being copied. Ouch.
I would make `yc` copy the current page's URL too (instead of M-y...),
but that would make things way too confusing. Maybe sometime in the
future, when I unlearn `yc`.
|
| |
|
|
|
|
|
|
|
| |
* fix failed assertion on non-ha-column half-width chars followed by
handakuten with text-transform: full-width
* fix dquot full-width conversion
* fix lone half-width han/dakuten conversion
|
|
|
|
|
|
| |
* move out half width <-> full width converters
* snake_case -> camelCase
* improve toScreamingSnakeCase slicing
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
derived from w3mman2html.cgi, there are only a few minor differences:
* different man page opener command
* use man:, man-k:, man-l: instead of query string to specify action
* no form input (C-lC-uman:pageC-m is faster anyway)
TODO rewrite in Nim so we don't have to depend on Perl...
|
|
|
|
| |
int was incorrect
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add functions for moving to the beginning/end of words (vi `b', `e').
* As it turns out, there are many possible interpretations of what a
word is. Now we have a function for each reasonable interpretation,
and the default settings match those of vi (and w3m in w3m.toml).
(Exception: it's still broken on line boundaries... TODO)
* Remove `bounds` from lineedit, it was horrible API design and mostly
useless. In the future, an API similar to what pager now has could
be added.
* Update docs, and fix some spacing issues with symbols in the tables.
|
|
|
|
| |
Also for reducing compilation time.
|
|
|
|
|
|
|
|
|
| |
Speeds up compilation somewhat. Included in the repository because
it's not that huge.
misc changes:
* use seq, not set for UCS-16 sets (it takes up less space)
* remove unnecessary noSideEffects casts
|
|
|
|
| |
why not
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Makefile: fix parallel build, add new binaries to install target
* twtstr: split out libunicode-related stuff to luwrap
* config: quote default gopher2html URL env var for unquote
* adapter/: get rid of types/url dependency, use CURL url in all cases
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now it is (technically) no longer mandatory to link to libcurl.
Also, Chawan is at last completely protocol and network backend
agnostic :)
* Implement multipart requests in local CGI
* Implement simultaneous download of CGI data
* Add REQUEST_HEADERS env var with all headers
* cssparser: add a missing check in consumeEscape
|
|
|
|
| |
Also, move default urimethodmap config to res.
|
|
|
|
| |
Also case-sensitive, but for now that is the same as normal matching...
|
|
|
|
|
|
|
| |
Probably not fully correct, but it's a good start.
Includes proprietary extension -cha-half-width, which converts
full-width characters to half-width ones.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we use a (much simplified) gopher2html binary in libexec,
instead of converting gopher directories to HTML in loader/gopher.
This has two advantages:
* Less ugly conversion logic in the loader module; we can just
convert the file line by line. (The previous converter also had
some correctness issues, that is fixed now as well.)
* If the user desires, they can replace the gopher converter with
another binary using the mailcap mechanism.
The disadvantages are:
* For now, source display is broken. This is a problem with all
mailcap filters in general, and should be fixed in the future. (That
said, the previous version also only displayed the converted HTML
source, which was not really useful anyway.)
* The proper directory structure is required for this to work;
OTOH plenty of work has been done so that this is as frictionless as
possible, so it should not really be a problem.
|
|
|
|
|
|
| |
* Add a default urimethodmap that points finger: to cha-finger
* Install cha-finger to /usr/local/libexec/cha/cgi-bin by default
* cha-finger: use ALL_PROXY if given, die if curl is not installed
|
|
|
|
|
|
|
|
|
| |
* Paths are now parsed through an unified code path with some useful
additions like environment variable substitution.
* Fix a bug in parseConfigValue where strings would be appended to
existing arrays (and not override them).
* Fix beforeLast calling afterLast for some reason.
* Add a default CGI directory.
|
|
|
|
|
| |
It was a bad idea to enable by default, as it is mostly pointless
and is a potential security hole.
|