Commits
- 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:
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:
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:
65c4966563d067115fc09f5e5c8c43a917b1cf03
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework the history management
It was a huge pile of spaghetti with useless utility functions and
lots of code reaching into the "data structure" (if you can call it
so) to do stuff.
Instead, provide a "module" with a clean interface and noone reaching
in the insides.
- Commit:
5bd159bd7fa62c6371d7bc0645cf77c7197ead70
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't allow the history to grow too much + save_session refactoring
add a mechanism that will signal a regeneration of the history file once
it reaches the 150% of the HISTORY_CAP.
while here refactor save_session, now it's somewhat readable.
- Commit:
3e36ea51f650498b743754daa74d4aa039129956
- From:
- Omar Polo <op@omarpolo.com>
- Date:
unbreak history file
I can't use the ""generate temp file + rename" trick used for the
session file, because I only add items that are not "dirty".
the history-on-disk things needs some improvements, mostly to limitate
the size of the file, but for the time being unbreak it!
- Commit:
64f4f8e21263a2ffeede63a19bbb28c897a90f2a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move load session stuff to session.c
- Commit:
de6a6a402e45970c4b6d65778efc2e990c4a78a4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
generate session/history_file atomically
if an i/o error occurs while writing those files, they may end up
being corrupted or truncated. Use the approach already used for tofu,
write a temp file and rename(2) it to the correct position.
- Commit:
f63b8f7342aefba6b3dac50d6790981987c8faa8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
merge the fs into the ui process
The previous separation between the fs and ui process wasn't that good.
The idea was to have a `ui' process tightly sandboxed, but it was a lie
actually. `ui' was one imsg away from making internet connections and
accessing data on the disk, so it wasn't really limited in (almost) any
way.
Furthermore, having to serialize data to/from the fs proc started to
become not really maneagable.
As a first step to fix this situation, join the fs and ui process.
- Commit:
9e97090d644b51c0cb6e049e8c777139b18457fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
persist list of visited URLs to the disk
Persist a generalized history of visited URL in history_file and try to
keep it in sync during telescope usage and shutdown.
- Commit:
3b30597e56e63940e29e1183b93c91e5af99cfb9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
initialize each tab loadingev timer event
found on freebsd: closing a tab caused the message "event_pending:
event has no event_base set" to be print.
- Commit:
81a7ff41a7bd5b30c98404719a4dada24651f7e1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
doesn't need parser.h anymore
- Commit:
fb8dcd1c494b0339067ca13f5bfc8ac8a1a43114
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move TAB_LAZY flipping from switch_to_tab in load_url
load_url needs to know when a tab passes from lazy to not lazy to
correctly saves the scrolling position (see follow-up commit.)
- Commit:
e795e9355a607cbda3790e5c651c1a6f829e4326
- From:
- Omar Polo <op@omarpolo.com>
- Date:
save and restore scroll position
Save the offset to the first and current line of the buffers and restore
it when the page is loaded. This restores almost the exact viewport: we
save the offset of the *real* line in the document, but they get wrapped
before being displayed, so the actual restored position may be slightly
above from the original one (think of a long paragraph that gets wrapped
over multiple visual lines.) In practice, this isn't a drawback but
only an improvement over the current behaviour.
In the future we could save also the offset *inside* the line, to
restore the exact position, but that felt unnecessary for now.
Persisting the postion on the session file ensures that even when
re-opening telescope the scroll position is correct.
There are some very active pages, such as antenna or other aggregator,
where this feature doesn't really work well if you re-open the page
after a while, since new links are available, but otherwise is a god
sent!
See also github issue #1
- Commit:
b7286684d73624890ce1d663c499eb8acc9c845b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix glitch with tab-bar-show=1 and tab-undo-close
a missing ui_schedule_redraw on unkill_tab means that the tabbar is
not rendered when calling tab-undo-close when there is only one tab.