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 .
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.
This time I'm directly messaging the background script in order to
trigger a tabopen rather than trying to bring tabopen to the content
script.
Closes https://github.com/tridactyl/tridactyl/issues/902.
This commit adds a .TridactylEditing class to input fields that are
being edited in an external editor. In the default theme, this
corresponds to just adding Tridactyl's logo to the input field.
It looks like it is impossible to reference Tridactyl's logo in CSS and
have it work on non-privileged pages so instead of doing that we add a
step to the build process which turns one of Tridactyl's logo into its
base64 representation and embeds it in the default.css theme file.
This patch improves upon the existing zoom excmd and adds some features present
in Vimperator and Pentadactyl. `zI` and `zO` are now bound to the maximum and
minimum zoom levels respectively. `zM` (read zoom more) zooms in on increments
of 50pp and `zR` (read zoom reduce) zooms out on increments of 50pp.
In addition, overshooting the zoom level while using relative adjustments is now
handled by setting the level to it's max/min zoom level.
An error is thrown if an absolute value is given that is out of bounds of the
allowed zoom range.
This commit removes unnecessary documentation, tries to make the
introduction shorter and fleshes out the documentation of a few
under-documented functions.
When trying to load a theme named `test.css`, `loadtheme()` would
attempt to store it in the config as `test.css`. But the config stored
it as an object named `test` which contained a key named `css` and this
broked everything. This is fixed by making sure that users do not
specify the `.css` part of the theme themselves, instead it will be
automatically added when trying to load the file.
Documentation has been updated accordingly.
- Update the readme to mention `colors $theme` rather than `set theme
$theme` because `colors` is more powerful than `set theme`.
- Update the doc
- Version bump native messenger and nativegate check
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.
Doing this required moving tabopen and some of its dependencies to the
content script.
Closes https://github.com/tridactyl/tridactyl/issues/902.
`:set noiframeon` has been broken since at least 1a1588a8 because of the
use of target.concat instead of target.push. This caused subsequent
config.set() calls to interpret every url except the last as being part
of the keys that needed to be set in the config rather that as urls that
should be saved in the noiframeon setting.
This commit makes {set,get}clip display error messages when they fail to
interact with the X selection. Somehow exceptions are lost somewhere so
we use fillcmdline manually. This problem will disappear once these
functions are moved to the content script.
Fixes https://github.com/tridactyl/tridactyl/issues/959
3ec27fd broke the commandline by moving config.ts while
metadata-generation/using code relied on its path. This commit updates
the path. A proper fix is to stop using paths and use names instead.