Commit Graph

11 Commits (34fb1b2ff44f2a016a58f74cfbf72538340ee321)

Author SHA1 Message Date
Daniel Barlow 34fb1b2ff4 revisit completer/completion api
A completion is now a table with attributes :text, :widget, :value
A completer returns an array of completions

This means we can now render URL completions with the page title
as well as the URL
2023-01-15 16:55:22 +00:00
Daniel Barlow cc0f881fed fix tests for rename 2023-01-02 18:22:46 +00:00
Daniel Barlow e4ed51e137 add gtk stuff to show completions as user types 2022-12-31 16:46:34 +00:00
Daniel Barlow fb834f496c rename on-input -> on-activate
it's only called when RET is pressed, not during editing
2022-12-31 16:46:34 +00:00
Daniel Barlow 28080a1387 define-command parameters now specify a 'completer' function 2022-12-31 16:46:27 +00:00
Daniel Barlow 5069e6aff1 move command state into per-frame table
lots of dependent changes here, unfortunately

- get rid of Buffer.current (it's per-frame now)
- in define-command, functions providing default parameter values
   now accept frame as parameter
- in keymaps, parameter values are functions that accept frame as
   parameter
2022-12-27 12:25:50 +00:00
Daniel Barlow 2610930690 mark command.reset-state as private (except for tests) 2022-12-23 19:52:40 +00:00
Daniel Barlow 8d871b20b8 define command parameters as array not kv table
a command should be able to say in which order it wants to ask for
unsupplied parameter values
2022-12-23 19:48:17 +00:00
Daniel Barlow 1c1608fe1f add invoke-interactively, for use in keymaps
move commander widget to Command.widget
2022-12-21 18:04:20 +00:00
Daniel Barlow 491f3225b0 deactivate commander at startup
use M-x to activate it
2022-12-21 15:26:24 +00:00
Daniel Barlow 0e103a673c first pass at commands with args
very rudimentary ui, and only handles string args
2022-12-21 15:26:24 +00:00