Done:
Working completion for buffers
Substitute values into command line
Prepare for non-buffers completions
Wrote too many classes and helper functions
Todo:
Learn inferno and hopefully simplify
If not, simplify the main functions so that people can actually
build for it.
Define an interface for tabbing through options
Allow more than one CompletionSource per command
This commit squashes a load of work by @Koushien, a dozen hours from
@cmcaine and some CSS by @bovine3dom.
@cmcaine is writing this commit message, but the work was mostly by
Koushien so the author is set to them. Thanks Koushien!
The following issues need to be fixed:
- The interface is over complicated (my fault)
- commandline_frame is hard-coded to use BufferCompletionSource. This
needs to be made more general
- BufferCompletionSource should be generalised
- completions.ts calls helper functions in commandline_frame. Should
just use browser proxy. If that's too slow can define a
completions_background.ts
After that's done, this should be fixed:
- Completion hiding/unhiding is currently too messy.
It is already bound to "gr".
Unless and until the keyboard api is ready or Firefox allows
webextensions to inject scripts into the very security-sensitive
about:reader context, this will only switch on reader mode. One
can get out of reader mode, by pressing <Alt-←>.
Once one of the above conditions is met, the toggling should work
without any further changes.
Increments the last number in a URL by a given step (positive or
negative)
Also includes a url_util helper module and some tests for it
Logic taken from vimperator browser.js:17
Firefox doing what it does on Escape in input
fields fires both the input and keydown listeners
leading to a race condition. Rudimentally protect
ourselves by checking completions directly since
it is always modified sequentially.
User shouldn't notice any difference besides:
* removing "buffer " from cli clears buffers
* retyping "buffer " repopulates buffers
* text after "buffer " filters with smartcase.
We no longer directly set completion's innerHTML.