Commits


convert ir_select_reply() to iri


add load-url-use-heuristic knob This is still WIP and may change before the next release. It could be worthwile to resolve the URLs in load-url using the current page as base, so that while browsing <gemini://a.org/b/c>, using load-url to go to "/" would load <gemini://a.org/> instead of <file:///>. The new option `load-url-use-heuristic', if unset, provides exactly this behaviour. It is still a bit rough to use, as for e.g. loading <d.net> would now yield <gemini://a.org/b/d.net> instead of <gemini://d.net>. Will need more work in-tree, but for now add it so we can reason about it. See github issue #10


use the new iri parser in ir_select_gemini While here also add some error checking.


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!)


reset all the state functions regardless of MB_READ vs. MB_COMPLREAD must_select otherwise is set when MB_COMPREAD but not cleared on MB_READ, yielding funny errors. While here, move also the other parts of the state out of the if (MB_COMPLREAD) to avoid this kind of issues in the future.


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.


recompute_completions: use the history too when viewing it


minibuffer_compl_text: honour the history items


don't insert current candidate in eecmd_select after the recent 'must select' thing there's no need to call minibuffer_insert_current_candidate from eecmd_select anymore.


readd forgotte NULL check


readd "select first completion" when must_select is provided The "don't automatically select the first completion" was a good change, but for commands that need a must_select policy it's annoying. This readds the automatic selection but only for those commands. It's still better than before the changes because now it's clear when and what gets automatically selected.


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.


update the "optional completion" *_select functions


don't highlight the first completion by deafult This is the first commit of a series to improve the handling of completions. Currently it's a mess: some commands look at the selected entry, others at what was typed in the minibuffer... it's not clear which commands does what. So, change of defaults: don't highlight anything by default to avoid confusing the user, C-n and C-p now are the obvious way to move the focus from the minibuffer to a completion. This doesn't change how the commands handle the selection, that will done in a follow-up commit.


tokenize minibuffer input for better matching instead of trying to match the given string as-is, split it into tokens (space-separated words) and try to match those. This allows to match out of order, for example "mir vid" will match gemini://vidage.rocks/blog/parliamo-di-mirror.gmi