Commit graph

1754 commits

Author SHA1 Message Date
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
glacambre
b94c3dccab
Merge source code for hint -s/-S/-a/-A 2018-08-04 18:52:22 +02:00
glacambre
b5287290e0
excmds.ts:hint(): Turn big if/else into switch/case 2018-08-04 18:52:19 +02:00
glacambre
caf76bb186
Port hint -w/-wp to newfangled way 2018-08-04 18:52:16 +02:00
glacambre
93acb6831b
Port hint -r to newfangled way 2018-08-04 18:52:13 +02:00
glacambre
59d030bd54
Port hint -; to newfangled way 2018-08-04 18:51:31 +02:00
glacambre
87a360a1f9
Port hint -s/-S/-a/-A to newfangled way 2018-08-04 18:51:28 +02:00
glacambre
1537ada421
Port hint -k to newfangled way 2018-08-04 18:49:21 +02:00
glacambre
74d58cdc46
Port hint -i/-I to newfangled way 2018-08-04 18:49:17 +02:00
Mohammad AlSaleh
d9258f7993 tabmove: We don't need separate branches for + and - anymore
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2018-08-04 19:14:32 +03:00
Mohammad AlSaleh
728b5ccadf tabmove: Make 0 a real alias to $
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2018-08-04 18:01:19 +03:00
Mohammad AlSaleh
9df30d2dce tabmove: Fix absolute and default moves
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2018-08-04 17:48:53 +03:00
Mohammad AlSaleh
6bab32f99b tabmove: Treat pinned and unpinned tabs as separate groups
Fixes #877

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2018-08-04 15:44:47 +03:00
Oliver Blanthorn
7cbb72d63c
Merge pull request #891 from glacambre/dont_delay_simple_hints
Don't delay simple hints.
2018-08-04 12:14:11 +01:00
glacambre
4d7beff315
Don't delay simple hints
This commit makes sure that hint selection for non-vimperator hints is
instantaneous.
2018-08-04 12:03:49 +02:00
Oliver Blanthorn
593e52939e
Add some extra bits to the changelog 2018-08-03 22:52:43 +01:00
Oliver Blanthorn
b7158d2dba
Fix default hint case 2018-08-03 22:25:15 +01:00
Oliver Blanthorn
cd89a1d1e9
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_hint_bug 2018-08-03 22:09:07 +01:00
Oliver Blanthorn
aaa0016fc5
Fix #386: add hintdelay setting
As a bonus, move glacambre's goal posts
2018-08-03 22:01:28 +01:00
glacambre
49309d9486
Improve hint error handling.
Instead of returning null when no hint has been selected, hinting.pipe
will now return a promise that will be resolved once a hint has been
selected or rejected if hintstate is destroyed without a hint being
explicitly selected by the user or if there are no hints to select.

Promise rejection is then handled at the end of excmds.ts:hint(), as
suggested by bovine3dom on Riot.
2018-08-03 22:56:12 +02:00
Oliver Blanthorn
20d8ec0309
Merge pull request #890 from glacambre/implement_mode_for_unbind
Implement mode for unbind
2018-08-03 07:40:06 +01:00
glacambre
e1affec065
Implement mode for unbind
Closes https://github.com/cmcaine/tridactyl/issues/887.
2018-08-03 06:50:04 +02:00
Oliver Blanthorn
9597f2facb
Merge pull request #889 from glacambre/fix_commandline_on_svgs
Fix infinite recursion on SVG
2018-08-02 08:02:26 +01:00
glacambre
b79fddf258
Fix infinite recursion on SVG
On SVG pages, trying to open the commandline results in an error. We
attempted to log this error using logger.error, which in turn tried to
open the command line. Recursion ensued.

This is fixed by not using the logger to log these errors to the. A
better solution could be to have the logger use the notification API to
tell the user about errors that happen while logging errors, but this
would require a new permission, which we shouldn't ask for until a
solution to https://github.com/cmcaine/tridactyl/issues/788 and
https://github.com/cmcaine/tridactyl/issues/708 is found.

This fixes https://github.com/cmcaine/tridactyl/issues/879.
2018-08-02 06:48:25 +02:00
glacambre
2f6bd1726e
Fix hint bug.
In hinting.ts, pipe() and pipe_elements() assumed that the resolve
function they passed to hintPage() would always be called, which wasn't
always the case (e.g. when a users goes into hint mode but presses
`<Esc>`).

This caused unresolved promises to linger in the tab. When the tab was
closed, an error was thrown about the message manager being
disconnected. This was caught by Tridactyl and displayed in the command
line.

We're fixing this bug by passing no-op functions as onSelect to
hintPage() and explicitly passing the resolve function. The resolve
function is then saved in HintState and called when destroying
HintState.

We parametrize reset() in order to be able to distinguish between resets
caused by a hint being selected and by the user pressing `<Esc>`. This
is necessary because we need to know when the function should resolve
the last focused hint and when it shouldn't.

We then add a bunch of null handling in excmds.ts:hint() in order to
make sure not to introduce other bugs.

This fixes https://github.com/cmcaine/tridactyl/issues/855.
2018-08-01 20:41:01 +02:00
Oliver Blanthorn
083abf029e
Mention hint case setting in hint help 2018-08-01 14:04:47 +01:00
Oliver Blanthorn
74117e29ee
Merge branch 'master' of github.com:cmcaine/tridactyl into hint 2018-08-01 14:03:36 +01:00
Lucian Poston
9263b3f213 hintuppercase to toggle CSS overriding hint case 2018-08-01 02:50:36 -07:00
Oliver Blanthorn
8840b4008e
Merge pull request #884 from antonva/fix-autocontainers
Add auconenable config check.
2018-08-01 09:57:27 +01:00
Anton Vilhelm Ásgeirsson
3f0edaf202 Change auconenable check to check size of autocontain object. 2018-07-31 22:21:42 +00:00
Anton Vilhelm Ásgeirsson
e7524f191c Add auconenable config check.
Ignores all autocontain directives unless config variable is set to
"true".
2018-07-31 21:56:18 +00:00
Colin Caine
876050d410 milliseconds aren't strings 2018-07-30 23:51:08 +01:00
Colin Caine
6bd55f842d Better workaround 2018-07-30 23:47:02 +01:00
Colin Caine
7cd0468752 Workaround loop forever bug in help.ts 2018-07-30 21:36:39 +01:00
Oliver Blanthorn
5e0c8243f3
Merge pull request #881 from poinck/patch-1
native_messenger: fix invalid syntax
2018-07-30 19:04:40 +01:00
André Klausnitzer
5cb26902e9
fix invalid syntax for os.path.join(... 2018-07-30 19:54:34 +02:00
Oliver Blanthorn
bf1a2ad5c0
Fix #866: add yet another flag syntax, this time for binds 2018-07-30 18:27:08 +01:00
Oliver Blanthorn
24a568d5d7
Fix wrong directory 2018-07-30 17:57:08 +01:00