Commits
- 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:
b7286684d73624890ce1d663c499eb8acc9c845b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix glitch with tab-bar-show=1 and tab-undo-close
a missing ui_schedule_redraw on unkill_tab means that the tabbar is
not rendered when calling tab-undo-close when there is only one tab.
- 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:
05de8ac36a0646bbcf74d36b25b96244ac1290ff
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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.
- Commit:
1b45e5df963885e127b251dbb6d8f6d5e704cf47
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix outdated comment
free_tab now operates exclusively on the killed tabs list, so don't
mention the current_tab.
- Commit:
265508d0c8d4d558a8661b9cd5936317f72a1c79
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add double space at the end of the sentence
- 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:
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...
- Commit:
ea63925028272e2324146df682e86f4ca3c60a8c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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.
- Commit:
f8c6e75351fd01dc58eabd367348ce79fe131193
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reuse struct session_tab when saving the session
- Commit:
bb28f1c2f6463f1e8881c90bb17a404cf7e5c3b7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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.
- Commit:
fcd99a0d4765b480ed9fa260b253770a85313a1e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch to our new struct download for the downloads
- Commit:
b9fcc0e904dfa51639d0c1c94de7a7b864b9a72a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix build, missing include on fs.h