Commits
- 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:
0d877486d2b85f6e333e50765e1f2cf8119da67c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
const-ify some tables
- Commit:
4cf6ba137fc2ca92f3066c390b89542d88735ef6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remote open: open an url into telescope from outside of it
if telescope is started with an url while there is already another
instance of it running and the -S flag is not provided, the link will be
automagically opened into the running instance of telescope.
Telescope now listens on a UNIX domain socket in ~/.telescope/ctl (or
~/.cache/telescope/ctl if XDG is used) for commands.
- Commit:
acf9defe6aa430581cda55be848d06c76da738ad
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make `reply-last-input' work on gopher too
- Commit:
ed504b9e1a0307a13e869cb3296f07ec072dae42
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reply-last-input: reply input requests on demand
Telescope now remebers the last URL (per tab!) that replied with
1X (input request.) The new command reply-last-input allows to
resend a query to that URL.
It's particularly useful with capsules that make a heavy uses of
10 replies (search engines or similar, interactive pages, etc)
because it both saves a network roundtrip and the user from looking
for the "search" link all across the page ;-)
idea from a conversation with thfr@, thanks!
- Commit:
693188cbff678ee0934f5fe5da91365614864888
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ui_require_input: take a fn pointer instead of the protocol number
- Commit:
1bcb8303e1b913df31980ca332a5619424a72b01
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move load_page_from_str to telescope.c
I'd like to use parser{,_gophermap,_gemtext}.c in standalone testing
programs, and this function is getting in the way since it depends on
ui.c
- Commit:
bf5b33f40e876afe41fd486ff5d3eb182dfaf046
- From:
- Omar Polo <op@omarpolo.com>
- Date:
correctly save scrolling position
Before we didn't save the scrolling position before a refresh
(nohist=1) and that's annoying. This saves the scrolling position
only in the correct case, which is when changing from a page to
another, expect when switching to TAB_LAZY off.
- 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:
52a99c568d70787741ab72597d29960acb78c738
- From:
- Omar Polo <op@omarpolo.com>
- Date:
avoid possible use after free
`url' may be a pointer to a string of the buffer which gets corrupted
upon tab_stop.
This bug shows when loadfn is load_about_url, because in
make_fs_request we first tab_stop, and then send the request, which
ends up sending to the fs process a free'd string. At least on
OpenBSD with Otto' malloc is (partially) corrupted and will either
make the fs process abort or return a not found page.
One solution may be to rework make_fs_request to process things in a
different order, but that would only hide the problem. Instead, use
the newly created history element as url given to the loadfns: that is
guaranteed to be valid up to the next load_url call.
Reported by Brian Callahan, thanks!
- Commit:
0259f38d36d8538ee723be82e20e5ccf29fcd385
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify load_url_in_tab
- Commit:
9d65b1d9ae3209a8a2bc8e8c376dede4f71290ce
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move util.c declarations in utils.h
it's not spelled `util.h' because otherwise it'd get included instead
of /usr/include/util.h
- Commit:
8f3c9af8369ac653695ca22777db99bfa1162cfe
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify the caching API
- don't expose the evbuffer where we store the cached page
- cache to/from tabs instead of buffers
- Commit:
5df02e0d8d9027c56450c94857949b3826454369
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix start_loading_animation usage
the idiom
if (load_next_page(...))
start_loading_anim(...);
is fundamentally wrong because `load_next_page' (or previous page, or
anything else that call into load_url) *may* load all the page before
returning (thanks to the cache, but not only, cf. load_page_from_str.)
Instead, let's call start_loadign_anim at the start of make_request so
it's always called in the right moment. Cache and other special pages
don't end up calling make_request anyway, and we already call
stop_loading_anim when a request finishes (or fails.)
move start_loading_anim up in make_request.