This allows us to write the rc to OS. The only way to overwrite your current
rc file is to use mkt!, mktridactylrc! or mktridactylrc -f. mkt* commands
issued without the force/exclamation mark will not overwrite existing files.
Native messenger was updated to 0.1.11 and the mktridactylrc command is
unavailable in prior versions.
Fixed some random indentation errors that occurred in earlier commit.
This commit turns hint mode into a real mode. This required several
changes:
- In `src/content/hinting.ts`: create a function named getHintCommands
which returns an object containing functions that can be used as ex
commands.
- In `src/content/hinting.ts`: rewriting the `parser` function to have
it check the `hintmaps` object in the config and trigger these if
they're bound to anything. We can't use a generic parser because
vimperator hints need to catch every single keypress, even the ones
that aren't bound to anything and act on them.
- Creating `src/background/hinting.ts`, which just wraps ex commands
from src/content/hintings.ts in a proxy which will forward calls to the
content script.
Also document noiframeon, which I discovered was undocumented
because of the type checking.
It makes splatted config.gets rather uglier with `...args` ->
`args[0] as keyof config.default_config, args.slice(1)...`.
It has apparently also broken config completions.
This commit fixes a bug reported by cmcaine. The issue was that when you
have multiple windows on multiple workspaces, taball wouldn't switch
focus to the right tab. This happened because taball relied on
browser.windows.update(id, {focused: true}) having switched to the right
window before calling idFromIndex. This didn't always work because
sometimes window managers will keep the current window focused.
This test makes sure guiset has completions and actually writes
something in the user's userChrome.
Writing this test made me discover that `-profile` was a valid firefox
argument and so I added support for that in native.ts. This made me
realize that the profile detection code didn't handle profiles that
aren't described in `profile.ini` and so I fixed that.
We couldn't have just invoked "check for updates" on every single
operation because it would've gone out to the RSS every time. This
refactor permits it to cache a highest known version for a
configurable interval. It should be safe to invoke this new
update-checking logic as frequently as desired.
BGSELF was a hack that I used when implementing ex commands for the
command line. It consisted of having .excmds_background.generated.ts
import itself as BGSELF in order to dynamically add commands to it. This
let us define excmds in other files while not changing anything in
parsers/exmode.ts.
This was awful so I decided to remove it. This required performing the
following changes:
- Moving text.* and ex.* command definitions to their own files where
they have zero side effects. While this was easy for text commands, ex
commands rely a lot on side effects. In order to work around this,
lib/commandline_cmds exports a single function, getCommandlineFns(),
which expects an object representing the commandline's state as
parameter.
- In the background script, import our side effect free files and wrap
them in proxys that will send "commandline_cmd" and "editorfn_content"
messages to tabs when needed.
- In the content script, add a listener that will either execute an
editor function or forward it to the command line when it receives an
"editorfn_content" message.
- In the commandline script, add a listener that will execute exmode
commands.