1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 05:07:59 +01:00

Add caret mode to help index.

This commit is contained in:
Kris Maglione
2011-10-03 19:14:27 -04:00
parent 705e481351
commit 48212b7392
4 changed files with 6 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ var Modes = Module("modes", {
}
});
this.addMode("CARET", {
char: "caret",
description: "Active when the caret is visible in the web content",
bases: [this.NORMAL]
}, {

View File

@@ -26,6 +26,8 @@ This file contains a list of all available commands, mappings and options.
<h2 tag="n-map-index">Normal mode</h2>
<h2 tag="caret-map-index">Caret mode</h2>
<h2 tag="v-map-index">Visual mode</h2>
<h2 tag="c-map-index">Command-line editing</h2>

View File

@@ -261,7 +261,7 @@
<description>
<p>
Start Caret mode. This mode resembles Vim's Normal mode where the
text cursor is visible on the web page. The <k link="false">v</k>
text cursor is visible on the web page. The <k mode="caret">v</k>
key enters Visual mode, where text is selected as the cursor moves.
</p>
<p>

View File

@@ -1569,6 +1569,7 @@ var Buffer = Module("Buffer", {
let file = io.File(filename.replace(/^>>\s*/, ""));
dactyl.assert(args.bang || file.exists() && file.isWritable(),
_("io.notWriteable", file.path.quote()));
return buffer.viewSourceExternally(buffer.focusedFrame.document,
function (tmpFile) {
try {
@@ -1580,7 +1581,7 @@ var Buffer = Module("Buffer", {
});
}
let file = io.File(filename.replace(RegExp(File.PATH_SEP + "*$"), ""));
let file = io.File(filename);
if (filename.substr(-1) === File.PATH_SEP || file.exists() && file.isDirectory())
file.append(Buffer.getDefaultNames(doc)[0][0]);