Commits


start to refactor the rendering Previously each vline (visual line) had a full copy of its associated string, this changes it so it only slices a part of the parent line. Reduces significantly the memory usage. This actually worsen the emojify-link glitch reported by Freezr after the some recent refactoring in the wrapping code. Not a big deal since I'm about to restructure the whole rendering bit by bit (hopefully!)


rate-limit the update of the download pane


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.


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.


ring a bell when remotely opening a link + refactor it a bit move the logic into its own function.


ui_require_input: take a fn pointer instead of the protocol number


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.


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.


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.


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


fix a couple of printw fmt strings two %d really needs %zu


add fringe prefix and allow to override offset for fringes alone


add vi-like `~' fringes after the end of the buffers


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.


improve tabs rendering