Commit Briefs


Omar Polo

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.


Omar Polo

add must_select flag for enter_minibuffer

it only makes sense when entering the minibuffer with completions. This flag is useful for functions like tag-select where the user types something but one of the completions *must* be selected.


Omar Polo

ring a bell when remotely opening a link + refactor it a bit

move the logic into its own function.



Omar Polo

set_scroll_position: further semplifications

Simplify it even further. There's no need to keep the curfound variable *at all*: if we end the loop, current_line is not found.


Omar Polo

set_scroll_position: always set current_line

There's a small chance we may end up finding the topline but not the current line if a page content is abruptedly changed. While here also drop `curfound = 1': it's a dead assignment since it returns in that conditions. Bug found while reading the output of clang' scan-build, but not thanks to clang. scan-build complained about the `curfound' variable, and by re-reading the code I spotted the missing case.


Omar Polo

don't reset scroll position if the cursor changed line

If the user managed to move the cursor before the page load, don't restore the scroll position. This is to avoid unnecessary jumping and causing possible confusion on the user.


Omar Polo

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


Omar Polo

fix a couple of printw fmt strings

two %d really needs %zu




Omar Polo

modeline: add an extra - after the trust status char

in part for symmetry, and in part because it seems a good spot to add an indicator for the presence of a client certificate in the future.


Omar Polo

improve tabs rendering


Omar Polo

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.