Commit graph

2090 commits

Author SHA1 Message Date
glacambre
ba2537cf04
Completions: do not show @hidden excmds 2018-11-07 08:39:36 +01:00
glacambre
ecc936ea7e
compiler: Add information about @hidden symbols to metadata 2018-11-07 08:12:53 +01:00
Oliver Blanthorn
9cf2c2f205
Hide fullscreen internal constant 2018-11-06 12:42:45 +00:00
Oliver Blanthorn
e3465efb36
Update package-lock, prod build bot 2018-11-06 12:40:21 +00:00
Oliver Blanthorn
e09ddab8a2
Fix #1137: merge branch 'donations' 2018-11-06 12:13:42 +00:00
Oliver Blanthorn
3bdd795e81
Merge pull request #1147 from glacambre/fix_commandline_space
Fix commandline failing to insert spaces in middle of words
2018-11-06 09:08:44 +00:00
Oliver Blanthorn
d93aa8bbf8
Merge pull request #1148 from glacambre/fix_990
excmds.ts: Don't rely on activeTab().index for tabprev/tabnext
2018-11-06 09:07:20 +00:00
glacambre
3d878a5ac3
excmds.ts: Don't rely on activeTab().index for tabprev/tabnext
Because of a firefox bug (
https://bugzilla.mozilla.org/show_bug.cgi?id=1504775 ), indexes are not
necessarily contiguous. This becomes an issue in tabnext and tabprev as
these two functions expect contiguous indexes.
We circumvent this issue by grabbing an array of all tabs for the
current window, sorting them by index and the using their index within
that array in order to decide what tabs should be selected.

This fixes https://github.com/tridactyl/tridactyl/issues/990 .
2018-11-06 07:55:14 +01:00
glacambre
b30c68fa51
Fix commandline failing to insert spaces in middle of words
Before this commit, it was impossible to insert a space in the middle of
a word in the command line ; the space would always be inserted at its
end.
2018-11-06 02:19:34 +01:00
Oliver Blanthorn
7f034a161c
Merge branch 'type_compiler' 2018-11-05 13:24:35 +00:00
Oliver Blanthorn
d385e65a76
Update dependencies
Add focus signature with no argument and Document.fullscreenElement to Document interface.

Add sloppy typing to fuseOptions.
2018-11-05 13:12:08 +00:00
glacambre
170ce78115
scrolling.ts: Fix sticky scrolling
Before this commit, Tridactyl used to "stick" at a page's edge. This was
caused by some values (namely lastX and lastY) that should have been
cached not being cached, resulting in Tridactyl trying to start
scrolling from the wrong element.

While testing this fix, I noticed that scrolling could be extremely slow
on large pages (e.g. https://stripe.com/docs/api). I attempted to fix
that by switching from a dumb parent/childNode traversal to a
TreeWalker-based traversal. While this helps a lot, scrolling can still
be slow on such pages.
2018-11-05 07:19:41 +01:00
glacambre
b5da7705e9
Improve generated metadata types for objects
Before this commit, the compiler pass that generated metadata for
settings didn't generate informetion precise enough to be used to
validate settings that existed in objects (e.g. `logging.cmdline`).

This resulted in no typechecking being done for these settings (e.g.
`:set logging.cmdline 1` would not throw any errors). This commit fixes
that.
2018-11-04 17:28:15 +01:00
glacambre
d80fa64b03
Turn numerical config settings into numbers
This commit turns every numerical config settings into numbers.
Previously, they were stored as string as casting the arguments of the
set excmd was slightly complicated. However, now that arguments are
automatically cast, there is no reason to keep using strings.

In fact, switching to number makes things simpler and fixes a few bugs
where the config setting was accessed without being cast, like in
text_to_speech.ts or completions/History.ts.
2018-11-04 17:28:11 +01:00
glacambre
4d0f7c84eb
Make the generated metadata typed
This commit makes the compiler pass use different classes in order to
represent the metadata. This enables adding per-class toString/convert
functions. This enables easy type checking and conversion in the `:set`
excmd.
2018-11-04 17:24:16 +01:00
Oliver Blanthorn
abbb51debd
Document im_ breaking change 2018-11-04 12:30:42 +00:00
Oliver Blanthorn
d796f3bf14
Merge branch 'generic_cmdline' 2018-11-04 12:28:31 +00:00
Oliver Blanthorn
ea3d01ab36
Remove really annoying ex-mode bind 2018-11-04 12:27:48 +00:00
Oliver Blanthorn
7b7cd7e1c1
Add gu reddit bind 2018-11-04 12:04:20 +00:00
Oliver Blanthorn
e6dad92a89
Add wikiwand specific yy bind to tridactylrc 2018-11-04 11:47:09 +00:00
Oliver Blanthorn
bf4ef89a82
Add examples for usage of funds 2018-11-03 15:14:20 +00:00
Oliver Blanthorn
1817f71793
Fix typo, remove unsupported centering 2018-11-03 13:16:37 +00:00
Oliver Blanthorn
d3b441a13b
Add donation text and image to readme 2018-11-03 13:12:53 +00:00
Oliver Blanthorn
321b537a61
Merge pull request #1141 from glacambre/nativemessenger_tutorial
Various tutorial improvements
2018-11-03 08:31:34 +00:00
glacambre
946e8031ad
Various tutorial improvements
This commit renames tutorial pages with the number in which they are
visited by the user. This helps when you need to add a new page and want
to link to the previous/next one in it.

It also adds a new page about the native messenger which describes what
it does and how to install it. I took this opportunity to rename
installnative to nativeinstall and to add an ex alias that goes the
other way.

Last, this commit  mentions that `:help` also accepts settings and keys
as argument and that we now have a troobleshooting guide.
2018-11-03 08:06:30 +01:00
Oliver Blanthorn
cf651478fa
Relegate halloween to the changelog 2018-11-02 18:33:14 +00:00
glacambre
4f1b2d5e8b
config.ts: Add links to ex/text functions above {ex,i,input}maps 2018-11-02 12:57:31 +01:00
Oliver Blanthorn
de9fc2d4b5
Merge pull request #1136 from antonva/fix-1031
Add element property check to fix google product search bars.
2018-11-02 11:15:27 +00:00
glacambre
def94f795d
Document ex.* functions 2018-11-02 06:33:09 +01:00
Anton Vilhelm Ásgeirsson
9a338c1935 Add element property check to fix google product search bars. 2018-11-02 01:02:59 +00:00
glacambre
cfe5b5c597
commandline_frame.ts: Reset keyEvents
Before this commit, keyEvents was never reset. This caused weird issues
like control closing the commandline after a first ex command had been
accepted. We now reset keyEvents in two places ; when an ex command is
accepted (which could happen when inserting a completion, for example)
and when the command line is closed (which could be triggered by an
outside event).
2018-11-01 19:11:57 +01:00
glacambre
c0bffbd4e3
commandline_frame.ts: Remove unnecessary insert_completion_or_space fn 2018-11-01 18:43:59 +01:00
Oliver Blanthorn
2119bbea3e
Merge branch 'undo-tab-window-recent' 2018-11-01 17:27:48 +00:00
glacambre
682e4a1ae6
Add updater to move im_* functions to text.* 2018-11-01 18:24:17 +01:00
glacambre
b680cc638c
Document editor functions 2018-11-01 16:39:16 +01:00
glacambre
1b6b712c2b
excmds.ts: Merge ex/insert commands
This commit merges ex and insert commands that behave the same under a
single text.* namespace. document.activeElement is used in order to
figure out if the command should move the caret in the page or in the
command line.
2018-11-01 15:54:31 +01:00
Anton Vilhelm Ásgeirsson
e0fdeeb54e Add error handling to undo excmd and remove session limit. 2018-11-01 13:32:12 +00:00
Oliver Blanthorn
f94fb9aa3d
Merge pull request #1128 from glacambre/fix_713
css_util.ts: Fix navtoolboxunfocused rule not properly hiding navtoolbox
2018-11-01 09:54:24 +00:00
glacambre
bac095c109
css_util.ts: Fix navtoolboxunfocused rule not properly hiding navtoolbox 2018-11-01 06:24:03 +01:00
Colin Caine
0a36af8592 👻👻 IMPORTANT: ANNOUNCEMENT 🎃🎃 2018-10-31 21:54:39 +00:00
glacambre
eb726c0861 Add halloween theme 2018-10-31 21:49:02 +00:00
Oliver Blanthorn
b4cab5afe0
Mention that find mode is broken 2018-10-31 14:29:29 +00:00
Oliver Blanthorn
cd968ba9e8
Remove shrugface error
It was funnier when it wasn't tormenting end users who hit bugs
2018-10-31 14:06:09 +00:00
glacambre
00c01ec6ec
Enable rebinding keys in command line
We re-use the ex-command parser in order to enable rebinding keys in
command-line mode. Command-line manipulation is re-implemented using
previously-abstracter editor commands.
2018-10-31 08:16:58 +01:00
Anton Vilhelm Ásgeirsson
7bae3e77ae Refactor undo excmd to explicitly undo tabs, windows or recent.
This addresses issue #772 and adds functionality for "basic" tab and window
undo. Supplying either tab or window to the undo excmd will explicitly restore
the most recently closed item of the specified type.

Undo now has a return value of the [tab|window]Id or -1 if no matches are made.
Currently it looks like window ids aren't being used/kept when closed so that
might be a small gotcha.

This does not address the problem of the currently default "recent" mode where
seemingly random windows are reopened when no tabs fitting the current window id
are available.

U is now bound to `undo window` to specifically reopen windows.
2018-10-30 20:06:04 +00:00
glacambre
61499fa19a
excmds.ts: Move content of im_* functions to lib/editor.ts
This commit moves the content of the im_* functions to their own file,
lib/editor.rs. This enables a bit of refactoring since the functions are
not subject to the constraints set by the macro preprocessor. This also
makes re-using the editor functions later easier.
2018-10-30 09:10:49 +01:00
Oliver Blanthorn
454a63e779
Merge pull request #1110 from WhiteAbeLincoln/master
Add Fullscreen{Change,Enter,Left} autocommand events
2018-10-29 10:53:40 +00:00
Oliver Blanthorn
0b1e46b76c
Merge pull request #1117 from antonva/sanezoom
Add zm and zr zoom bindings.
2018-10-29 10:49:44 +00:00
Anton Vilhelm Ásgeirsson
37e0071e52 Add zm and zr zoom bindings. 2018-10-28 12:05:56 +00:00
Oliver Blanthorn
2594d1e87b
Merge branch 'make_completions_faster' 2018-10-28 10:56:36 +00:00