Commit graph

2048 commits

Author SHA1 Message Date
Oliver Blanthorn
14500f3dd0
Merge pull request #931 from henrebotha/patch-2
Fix property spelling
2018-08-20 10:28:18 +01:00
Henré Botha
bcddd127c4
Fix property spelling 2018-08-20 11:06:44 +02:00
Oliver Blanthorn
e126622fea
Reduce friction to getting Tridactyl 2018-08-19 22:30:54 +01:00
Oliver Blanthorn
d5d3f113e4
Fix #921: Use Escape rather than Esc in hard-coded config 2018-08-19 22:24:55 +01:00
Oliver Blanthorn
84001143c3
Merge branch 'update_typescript' 2018-08-19 14:10:15 +01:00
Anton Vilhelm Ásgeirsson
7c1f0cecfb Fix undo current_window_id check. 2018-08-19 12:32:04 +00:00
glacambre
cc94f7f790
Fix #926: rebind all rapid binds from g; to ;g 2018-08-19 13:13:11 +01:00
Anton Vilhelm Ásgeirsson
4c856621c5 Assert type of node object. 2018-08-19 12:08:49 +00:00
Anton Vilhelm Ásgeirsson
0908af9100 Refactor undo excmd to comply with ts 3.0.1. 2018-08-19 11:56:51 +00:00
Anton Vilhelm Ásgeirsson
0192fecfe2 Fix code bugs introduced by the 3.0.1 upgrade.
- Use a different object notation in newtab.ts to stop nagging.
- Remove unused function from src/keyseq.ts.
2018-08-19 11:31:54 +00:00
Anton Vilhelm Ásgeirsson
77f6008259 Update typescript to 3.0.1 and typedoc to 0.12.0. 2018-08-19 11:12:25 +00:00
Oliver Blanthorn
99cb56d4ad
Add tab alias for buffer 2018-08-18 20:55:57 +01:00
glacambre
2fe2742333
Add exaliases to Excmd completion source 2018-08-18 21:40:12 +02:00
glacambre
740397ed79
aliases.ts: Simplify getCmdAliasMapping() a lot 2018-08-18 21:38:47 +02:00
Oliver Blanthorn
4f1d96767b
Merge branch 'port_hints_to_new_fangled_way' 2018-08-18 18:28:47 +01:00
Oliver Blanthorn
85030eb7d9
Add binds for rapid and some old Pentadactyl binds 2018-08-18 18:28:11 +01:00
Oliver Blanthorn
f5a941dba4
Sort excmd completions alphabetically 2018-08-18 14:45:07 +01:00
Oliver Blanthorn
76c6bfb4dd
Fix error if config is at latest version 2018-08-18 14:26:53 +01:00
Oliver Blanthorn
d9a13dac9e
Merge branch 'fix_aliases_breaking_excmd_completion' 2018-08-18 11:24:50 +01:00
Oliver Blanthorn
115995c0ba
Add I, Shift-Escape ignore binds back 2018-08-18 11:15:46 +01:00
glacambre
e19b3ce49d
Fix excmd completion not working with nested aliases 2018-08-18 07:15:14 +02:00
glacambre
e6639ceb85
Fix aliases breaking excmd completion
As mentioned in https://github.com/cmcaine/tridactyl/issues/912, there
was a problem with aliases preventing some excmd completion options from
being displayed. For example, `b` would be expanded to `buffer` in the
command line completion mechanism and thus prevent `back` from being
displayed.

This commit fixes that by treating aliases as "real" excmds when
building completion sources. Basically, we check for aliases to the
prefixes given as CompletionSource parameter and add them to the list of
prefixes that can trigger the completion source.

We use this opportunity to remove the constraint of having to add a
space to each prefix, they're instead automatically added by the
CompletionSource constructor.
2018-08-17 23:09:17 +02:00
glacambre
495c9302a7
Fix #909: allow commandline to be pushed to side by scrollbar 2018-08-17 18:51:24 +01:00
Oliver Blanthorn
c51bdc87c7
Mitigate #917 until we get our heads around async 2018-08-17 18:38:51 +01:00
glacambre
f43adc9467
Make rapid hinting return an array
Rapid hinting now returns an array. When no hints have been selected, an
empty array is returned. When no hints have been selected in regular
hinting mode, an empty string is returned.
2018-08-17 07:59:00 +02:00
Henré Botha
263b4d3fa6
Update guiset to pad maximised windows 2018-08-16 21:18:04 +01:00
Oliver Blanthorn
0cee731d4b
Merge pull request #914 from glacambre/generate_theme_list
Generate theme list
2018-08-16 21:09:43 +01:00
Oliver Blanthorn
32a1fd25d4
Merge pull request #900 from henrebotha/patch-1
Prevent cutting off a few pixels at the top
2018-08-16 21:08:46 +01:00
glacambre
d77a3fa127
Use generated list of themes instead of hardcoded array 2018-08-16 21:03:56 +02:00
glacambre
b13956010c
Add list of static themes to generated metadata 2018-08-16 20:56:19 +02:00
glacambre
b6e32e975e
Normalize theme directory structure 2018-08-16 20:56:11 +02:00
Oliver Blanthorn
b54e4d9b41
Merge pull request #913 from glacambre/remove_completion_try_catch
Remove try/catch in excmd completion
2018-08-16 16:33:32 +01:00
glacambre
0d8957b536
Fix hint breaking when no option is given 2018-08-16 17:22:30 +02:00
glacambre
5eae45d0a0
Remove try/catch in excmd completion
This commit removes the try/catch in the excmd completion source and
instead makes the ExcmdCompletionOption constructor default to a string
for missing values.

This is useful for three reasons:
- The try/catch discarded excmds that didn't have a type/documentation,
  but being able to autocomplete the name of these functions could still
  be useful
- Try/catch are usually expensive
- TypeScript wrongly complained about a missing parenthesis when the
  try/catch was there
2018-08-16 17:09:13 +02:00
Oliver Blanthorn
57446fe57c
Merge branch 'master' of github.com:cmcaine/tridactyl into configdocs 2018-08-16 15:46:24 +01:00
Oliver Blanthorn
e1bb76600e
Merge branch 'master' of github.com:cmcaine/tridactyl into add_excmd_completion_source 2018-08-16 14:57:09 +01:00
Oliver Blanthorn
d2ae8cb92b
Rename Excmds -> ex commands 2018-08-16 14:57:03 +01:00
Oliver Blanthorn
2a56dd7981
Update package-lock 2018-08-16 14:53:46 +01:00
Oliver Blanthorn
8575a588b4
Pad ex cmd display a bit 2018-08-16 14:53:23 +01:00
Oliver Blanthorn
ecb2ffdecc
Sort Ex command by recency 2018-08-16 14:47:37 +01:00
Oliver Blanthorn
11168aa0d2
release 1.13.2 2018-08-15 21:24:45 +01:00
Oliver Blanthorn
b252e40a73
Update changelog for 1.13.2 2018-08-15 21:24:25 +01:00
Oliver Blanthorn
312dfedabe
Fix #880: block / usage on all sites 2018-08-10 23:46:36 +01:00
glacambre
703a8ac611
excmds.ts: Hide bind_args type and parse_bind_args function 2018-08-09 06:21:00 +02:00
glacambre
c63b2e214d
Make help.ts:getCommandElements() more resilient
Changes to the help page's layout can break the embedding of settings
into it. We fix this by making sure the CSS path selected doesn't depend
on the DOM hierarchy.
2018-08-09 06:19:32 +02:00
Henré Botha
983bf41378
Prevent cutting off a few pixels at the top
The minimal userChrome file causes 8 pixels to be cut off from the top of the "content" part of the page, but only when the navbar is hidden. This change, as written, will reverse the situation: it will add 8 pixels of extraneous padding when the navbar is not hidden. Given that we spend most of our browsing time with the navbar hidden, this optimises for the common case instead of the uncommon case.
2018-08-07 19:28:23 +02:00
glacambre
72db29b298
Move metadata.ts -> .metadata.generated.ts 2018-08-05 18:38:28 +02:00
glacambre
35466971b7
Implement basic excmd completion
This implements excmd completion. We're using the typescript compiler
API in order to get the documentation and the type of every function of
Tridactyl and generate a file named "src/metadata.ts" which contains
this information. Since this file is dependency-less it can be imported
from every source file.

We then write a regular completion source which just uses the data
contained in metadata.ts in order to generate its completions.
2018-08-05 17:12:49 +02:00
glacambre
6c3c04fc8d
Make rapid hint mode less janky, enable hint mode for every action
Making hint mode less janky is achieved by not resetting hint mode when
a hint has been selected. New command line options, `-q*` where `*`
stands for any alread-existing flag, are added.

The global hint flow is as following:
- User goes into hint mode
- hint mode promise is created
- When a hint is selected, the corresponding action is performed (e.g.
  opening a link, killing an element...)
- The result of the action is saved in the hint
- If we're not in rapid hint mode, modeState is reset, and the hint mode
  promise is resolved with the result of the action as parameter
- If we're in rapid hint mode, modeState is not reset. Instead its
  filter is reset and all its hints are displayed again.
- Rapid hint mode is only left on escape, and this means that the
  promise will be rejected.

Rejecting the promise means that we can't pipe elements selected in hint
rapid hint mode to other commands. This makes sense because pursuing
execution of a pipe several times in parallel, on top of being possibly
hard to implement, would probably be confusing.

Instead of using a pipe in order to execute arbitrary commands in hint
mode, users can use `-qW excmd`. Contrary to the pipe, this makes clear that
the excmd will be executed multiple times, once per focused hint.

This way of handling rapid hint mode has the advantage of simplifying
the `hint` function. Now, instead of having to return a tuple with the
number of available hints, the function can just return the selected
element or whatever the command line arguments specifies it should
return.
2018-08-04 20:18:43 +02:00
glacambre
fcf204f82e
Make most hint modes return their result for easy rapid hinting 2018-08-04 18:52:27 +02:00