Commits
- Commit:
f853ec6f0c0569cf5bae15ce3e9d8bfc533b358b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
handle tab characters
tab characters have their width depending on the column they're in,
since they extend to the next multiple of 8. (citation needed?)
So, keep track of the column when considering the length (in columns)
of the text, so that we can render them properly.
In the future we might want to turn them into spaces (either at read
or render time) just to stay on the safe side in case not all
terminals/ncurses implementations use 8 columns.
- Commit:
6d24bfb3ca185665e8a7fa4e5f88434690f4272d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use a byte offset to track the point in the line
Instead of using a code-point offset, use a raw byte offset and
navigate backward and forward by means of graphemes. This gives a
correct "visual" backward/forward navigation through characters.
- Commit:
fd1c80ce62030c6e75bb05db1aee43425d70fc97
- From:
- Omar Polo <op@omarpolo.com>
- Date:
constify the parser structs
- Commit:
c1d27b0e114e6a65f7979971940df212f00bb2ae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
untangle a bit buffers and parsers
Now buffers have a nicer interface, taking explicitly the buffer
where they push stuff, and the code that deals with buffers doesn't
need to peek into the parsers. The parsers now are 'pure' structs
without state attached to them, the state was moved to the buffer.
- Commit:
7b7a69f2aeeffb5436fd490f2020335b5bf9a121
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
update telescope to make use of mailcap
Change telescope to make use of mailcap entries.
Commands are no longer prompted for how to handle an unknown mime-type.
Commands are now executed via execvp(), and the mailcap handling assumes
this as part of its interface.
- Commit:
4e32d3a6c187dd9646ba4aa80a69082adf3b3c46
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
ui: add capability to run external cmds
When telescope encounters a file type which it cannot display it prompts
the user whether they wish to save the file, or not.
This patch extends this idea -- if the file is saved, then the user is
prompted to run a command against that downloaded file.
This controllable via the 'external-cmd' setting. It defaults to
'xdg-open'.
This is based off work originally started by op@.
- Commit:
0fe9ac228cc8e9b9115a6b613ddbb87589335180
- From:
- Omar Polo <op@omarpolo.com>
- Date:
parsers: add a parseline method
all our parsers just need a line to parse and don't always need the
free method. The gemtext parser could also be simplified with this,
but defer it for later.
- Commit:
1d91acb240fe40dbf5d6dd2c849ba449cc2d4af3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo
- Commit:
2b3b7d03c39b3b1522ef14814508ef6e3988d2b5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove unused printfn typedef
- Commit:
a3e4d56b6d9bcfca48f3d8c8f1e526e95b0c2f64
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
tls: guard against faulty gemini servers
Some gemini servers have faulty TLS handling, such as:
gg: tls_close: EOF without close notify
In such cases, telescope will receive that error and naturally assume
there was a problem and stop processing. However, in the case of there
still being legitimate content read from the request, this should still
be displayed, rather than ignored.
This change therefore detects this condition and adds a status of 'W' to
telescope's modeline to indicate that the information presented is from
a faulty gemini server and could be truncated and hence display oddly.
- Commit:
87d297d14e29cf2c5a8a11b8f4db518d9217e337
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move imsgev & co to their own file
This avoids bringing the dependency on ev on telescope-identity(1) and
the tests as well.
- Commit:
98d3e6c172747dc58042bde09a848d3e03572934
- From:
- Omar Polo <op@omarpolo.com>
- Date:
convert telescope to use ev instead of libevent
libevent is a very cool library, I like the APIs and enjoy using
it. However, telescope is not as large and doesn't have as many
file descriptor, so libevent is quite ``too big'' for our needs.
ev started as a small event loop on top of poll(2) for amused, and
can be used here too, it just needed to grow the ability to handle
several timers, as we need quite some on telescope (in fact, we use
more timers than fds!)
- Commit:
71bc16365736f1cc3212d46f3947806c1e33867b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add client_cert_temp flag to the struct tab
This way we can improve unload-certificate prompt. While here,
move the cert handling in make_request().
- Commit:
d163c2104eb8f8603c4dfc4c9ad566511eac143b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move tofu declarations to their own header
While here replace GEMINI_URL_LEN with TOFU_URL_MAX_LEN to avoid a
dependency on telescope.h. Ideally, we should move this stuff to
another header that comes with less dependencies.
- Commit:
b66e7d4d797290c7056dc20a215a6525d9d44042
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include compat.h explicitly in all files
don't do it in telescope.h, remove telescope.h from gencmd.awk and sort
the headers in parse.y while here.
- Commit:
cbe2da3279946cae9bb365a672e6600268de9cce
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move struct cmd and cmds declaration in cmd.h
- Commit:
d252d87ccdef3bf3619959f93601a9e74ffcc28f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include cmd.h only where it is really needed
- Commit:
d35e18b31b0e05c6178a6bfa891dd2e2dadf3db1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
first draft of client certificate support
At the moment telescope loads a mapping host:port/path -> certificate
from a file and always uses it, no ways to change it, use a temporary
one, generate a new one, etc are provided yet.
The format of ~/.telescope/certs/certs is
host port path certificate file name
where the certificate file name is the name of a file inside
~/.telescope/certs.
~/.telescope/certs/ is ~/.local/share/telescope/ when using XDG.
- Commit:
54764e41a11e16a56da805313f209a9937c5173d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
send the reply code and meta in a single imsg
- Commit:
b148be7145ec930043173b11be95bf6327d3b598
- From:
- Omar Polo <op@omarpolo.com>
- Date:
inline dispatch_imsg(); start to use some newer imsg api
- Commit:
6ab857d5a87585ace35a923121550f178f74a46d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move includes back to the root directory
Splitting stuff into sub-directories was just a big mistake.