Commits


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.


append killed tabs when parsing session to preserve the order The other option, less intrusive, would be to send the killed tabs in reverse order, but it'd seems strange when looking at the session file otherwise. So, add a `append' flag to kill_tab to optionally append the killed tab instead of pre-pending it.


fix outdated comment free_tab now operates exclusively on the killed tabs list, so don't mention the current_tab.


add double space at the end of the sentence


plug history memory leak when freeing a tab we have to release also its history.


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.


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...


simplify the lazy tabs handling it's cleaner to just toggle the lazy bit in switch_to_tab instead of pushing that complexity in load_url. While there also try to simplify the function and its documentation from unnecessary checks and extra verbosity. This also fixes a bug where Telescope ended up pushing the url on the history *twice* at startup.


reuse struct session_tab when saving the session


move parse_last_session to the fs process ~/.telescope/session was parsed in the main process before dropping in the sandbox: that's no good. This moves the initialization of the ui events later in ui_main_loop and makes so that the fs process, after entering the sandbox, parses and sends the content of the last session back to the main process; when it's done the ui gets loaded and telescope is back rocking. I'm plannig to re-use the struct session_tab during the save session operation soon.


switch to our new struct download for the downloads


fix build, missing include on fs.h


add a safe/sandbox mode When enabled with the -S (or --safe) flag, prevent telescope from writing files to the disk.


kill extra empty line


fmt (some missing space -> tab conversion)