Commits


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


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.


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.


move session_tab{,_hist} to session.h


remove forgotten load_last_session prototype


move more stuff outta telescope.c