Commits


fix display of certificate selection prompt


handle tab characters tab characters have their width depending on the column they're in, since they extend to the next multiple of 8. (citation needed?) So, keep track of the column when considering the length (in columns) of the text, so that we can render them properly. In the future we might want to turn them into spaces (either at read or render time) just to stay on the safe side in case not all terminals/ncurses implementations use 8 columns.


use grapheme_encode_utf8 instead of our home-grown utf8_encode libgrapheme does a few more checks than we do


use grapheme instead of utf8_next_cp


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.


typos; courtesy of codespell


move exec routines to their own file This leaves the room open to further improvements and tries to keep it apart from the UI itself.


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


ui: explain why we're not calling minibuffer_confirm


minibuffer: assume exit_minibuffer as abortfn


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.


prompt before opening the downloads


make yornp data be a void pointer instead of a tab


teach exec_external_cmd how to run programs in the background


refactor exec_external_cmd so that can be used in ui_edit_externally


improve error message for failed execve


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.


update telescope to make use of mailcap Change telescope to make use of mailcap entries. Commands are no longer prompted for how to handle an unknown mime-type. Commands are now executed via execvp(), and the mailcap handling assumes this as part of its interface.


configure: add a --with-default-editor option Ths is useful for Linux distributions which might not solely rely on EDITOR/VISUAL being set in the environment, but would rather use a wrapper command. Debian prefers sensible-editor(1), for example. Rather than make hard-coded assumptions in telescope for each distribution, this will make it easier for packagers of telescope to set this if needed. Defaults to ed(1) if not set.


ui_edit_externally: add a prompt in case the editor failed while here sprinkle also a fflush() to stay on the safer side.


fix logic error in editor selection use ed only when both VISUAL and EDITOR are undefined, not with one is defined and the other don't.


add mini-edit-external it's bound by default to C-x in the minibuffer keymap. It'll open an external editor to edit the content of the minibuffer. When the editor exits, we'll call the completion function with the content of the file. Stuff inputted with an external editor are not persisted to the history thought. That would require the UI to handle multiline strings which is currently impossible.


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.


ui: add capability to run external cmds When telescope encounters a file type which it cannot display it prompts the user whether they wish to save the file, or not. This patch extends this idea -- if the file is saved, then the user is prompted to run a command against that downloaded file. This controllable via the 'external-cmd' setting. It defaults to 'xdg-open'. This is based off work originally started by op@.


cmd: introduce toggle-styling This adds a new command `toggle-styling` which toggles the formatting between the defaults (or anything specified in a configuration file), and the "raw" prefixes as defined in the gemini file.