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.
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).
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.
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.
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.
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.
Before this commit, `:setpref my_pref "my value"` broke user.js by only
writing '"my' to the file. This created a syntax error and prevented
firefox from reading the rest of the file. This commit fixes that.
This commit makes idFromIndex("#") return the id of the currently active
tab instead of undefined when only one tab is open. This makes
Tridactyl's "#" behavior closer to vim's, but not 100% the same.
This closes https://github.com/tridactyl/tridactyl/issues/918 .