Commits
- 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:
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:
069c9a92f36df9d307d734ffa8903035c7181129
- From:
- Omar Polo <op@omarpolo.com>
- Date:
parsers: add serialize function
Add a parser_serialize function and an optional function `serialize' for
parsers. The default implementation just prints the text line, which is
suitable for parser_textplain and parser_textpatch; gemtext and
gophermap uses their own specific unparse functions.
This is intended for an incoming cache refactoring: we'll cache the page
serialized in the correct format, not once it has been translated to
gemtext. This will allow in the future to provide commands such as
``save page to disk'' or interface with an on-disk cache.
- Commit:
5a21e0eb51554d72c1b6465c2b4afc8cdef5dcf1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add fn pointer to the parser init function to struct parser
will come in handy in the future cache refactoring.
- 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:
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:
036c104e0d5b8758a8cf72c9085af23956fdfa6f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
de-duplicate hash_* function: collect them in util.c
- Commit:
ed21a9a1021f38c009ef8a0ea6049587e3b4373b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
provide a way to bypass the cache
This changes the last argument of load_url to be a `mode' bitmap
instead of a boolean ``nohist''. LU_MODE_NOHIST is the old 1,
LU_MODE_NONE is provided just for readability and the new LU_MODE_NOCACHE
allows to bypass the caching when loading a page.
Telescope only uses the cache when:
- re-opens a closed tab
- navigates backward and forward in the history
All other situations result in the usual network request.
- Commit:
0aef305d12c879faacb155c7b7348e6dcd99f394
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add vi-like `~' fringes after the end of the buffers
- Commit:
e39aa21224e2dc8acb8385118b4b17f99f2ccb7e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
kill old, unused forward prototype for non-existant struct page
- Commit:
bf935370ba5b03432f48ab4d05d6dc74416a85a6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
plug history memory leak
when freeing a tab we have to release also its history.
- Commit:
6c74799d01bfb8706f1972917da936fc2eee66da
- From:
- Omar Polo <op@omarpolo.com>
- Date:
allow to re-open closed tabs
Save closed tabs to a "killed tabs" queue, for up to a max of
"max-killed-tabs", and allow to re-open them. Keep the tab history
but not its content.
This integrates nicely with the session file, just add the "killed"
flag as alias for TAB_KILLED and put it in the ktabshead queue upon
initalization. It's thus possible to re-open closed tabs even after
telescope has been closed, and tabs keeps their history!
Add a new cmd, cmd_tab_undo_close, to try to re-open the most
recently closed tab and bind it to `u'.
While here, add a TODO for the tab history memory leak.
- Commit:
eb722b5028dcd686244ecbca2ff4bfb0a29a6c68
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move know_host parsing to the fs process and load the store via imsgs
Like previously did with the session file, now the main process doesn't
parse anything with the only exception being the configuration file.
With this in, the only bit from fs.h still used in the main process is
the path to the configuration file.
- Commit:
50f036824c2c9c860754f608c478c909642bdab1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
avoid zero-timer hack by triggering session initialization with IMSG_INIT
- Commit:
1040cc7fd1cf748a26766e65b2a2fde17e27310d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
implement persistent tab history
The session file is now overloaded with the history info, that means
that upon startup telescope can repopulate each tab history!
The price to pay is that one can't start an old telescope with a new
session file, otherwise will get a lot of fancy '<' and '>' tabs...