Commits


ensure vline len is correctly accounted for


clean up utf8.h includes that are no longer needed


use a byte offset to track the point in the line Instead of using a code-point offset, use a raw byte offset and navigate backward and forward by means of graphemes. This gives a correct "visual" backward/forward navigation through characters.


minibuffer: fix text accounting in minibuffer_taint_hist()


minibuffer: augment minibuffer_read with the initial input fixes a regression where the text inputted via ui_read() can't be edited.


minibuffer: assume exit_minibuffer as abortfn


include stdarg.h for va_start


minibuffer: redesign enter_minibuffer and fix regression use a struct to pass the arguments to enter_minibuffer since they're so many. While here, also allow to pass a printf(3)-like format string for the prompt and specify the initial input. Also, fix a regression: if we don't set vline.cplen we can't properly handle the input, so do that in enter_minibuffer to avoid having to fix all the callers.


minibuffer: fix insertion of candidate we missed to update the vline.cplen field when inserting a candidate in the minibuffer.


make yornp data be a void pointer instead of a tab


code: add wrappers for common failure cases Certain calls to well-known functions sometimes result in similar error handling across the code base. Sometimes there's a need to centralise the failure case. Achieve this for common wrappers to often-used functions. The transformation is achieved via coccinelle, commited with this patch. Note that coccinelle can be told to ignore code blocks with comment delimiters. This transformation applies just to telescope's code, and not any of the bundled depdencies in telescope (libgrapheme).


untangle a bit buffers and parsers Now buffers have a nicer interface, taking explicitly the buffer where they push stuff, and the code that deals with buffers doesn't need to peek into the parsers. The parsers now are 'pure' structs without state attached to them, the state was moved to the buffer.


minibuffer: pass the string to the donefn() This avoids the callback to have to use the (private) minibuffer_compl_text() to get the string. It'll simplifies a follow-up changes, too.


use snprintf(3) instead of a strlcpy/cat dance


move unicode_isgraph in minibuffer.c (codepoint_isgraph)


reset timer id after cancelling it


convert telescope to use ev instead of libevent libevent is a very cool library, I like the APIs and enjoy using it. However, telescope is not as large and doesn't have as many file descriptor, so libevent is quite ``too big'' for our needs. ev started as a small event loop on top of poll(2) for amused, and can be used here too, it just needed to grow the ability to handle several timers, as we need quite some on telescope (in fact, we use more timers than fds!)


typofix


guard against malformed default-search-engine


add cmd_search to search using a search engine This adds a new command `search', bound by default to `s', that prompts for a query and loads and consult the ``oracle'' (the search engine) using default_search_engine (which will be made customizable.) It also temporarly supports only gemini URLs. Feature requested by -fab-, thanks!


remove half-bake idea turns out telescope is not ready to generate certificate in the ui process, a separate helper will be added for it, so remove this option for now.


some headers cleanup try to not include headers from headers, and remove some redundant include. This helps in modularizing the codebase and also helps during incremental compilations.


move struct cmd and cmds declaration in cmd.h


tweak use-certificate yornp question


load and optionally remember client certificates This adds use-certificate, a user function to start using a certificate or switch to a different one. It asks whether to persist the certificate, if not it will only be used for the current session. use-certificate is implicitly called when the server replies with a 6x status code.