Commits


move load session stuff to session.c


merge update_cert and tofu_update into tofu_update_persist


merge tofu_add and save_cert into tofu_save


constify


move bookmark_page off fs.c


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.


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.


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.


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.


typo in parse_session_line without +4 strtonum sees top=X and cur=Y which are invalid numbers, so the scroll position is lost.


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


simplify parse_session_line drop sendtab which is not that useful and send the tab to the ui process directly in parse_session_line. It's easier to skip malformed session lines too!


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


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.


mark last_time_crashed as static