Commit Graph

19 Commits (main)

Author SHA1 Message Date
Daniel Barlow d962dd7c41 trim outdated stuff 2023-01-15 18:23:10 +00:00
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 c2c89b6dfd fix buggy call to instr 2023-01-03 21:18:29 +00:00
Daniel Barlow 3cbe77a55e sqlite-based browsing history api
not hooked up to actual browsing actions yet
2023-01-02 21:25:36 +00:00
Daniel Barlow cc0f881fed fix tests for rename 2023-01-02 18:22:46 +00:00
Daniel Barlow c1b7c2d777 add back button 2023-01-01 22:22:40 +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 dd139c9796 express keymap bindings as [command-name args]
instead of using functions directly. This is so that the
appropriate frame-relevant commander can be used to execure
the command, but also makes the keymaps a little less opaque
2022-12-26 16:53:41 +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 15c0ce3417 allow modifiers in keymaps 2022-12-23 14:43:29 +00:00
Daniel Barlow 25d31e0262 use keymap to choose command to invoke 2022-12-22 22:42:45 +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 ce009f2c7b improve test harness
use overmind and entr to run tests whenever files change
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