1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 14:55:48 +01:00

Replace 'ignorecase' and 'smartcase' with 'searchcase'.

This commit is contained in:
Kris Maglione
2010-12-04 17:21:15 -05:00
parent a26b410daa
commit 23fba45b28
7 changed files with 34 additions and 42 deletions

View File

@@ -686,7 +686,7 @@ const Dactyl = Module("dactyl", {
let res = <res>
<dt>{link(obj.name)}</dt> <dd>{obj.description ? obj.description.replace(/\.$/, "") : ""}</dd>
<item>
<tags>{template.map(obj.names.reverse, tag, " ")}</tags>
<tags>{template.map(obj.names.slice().reverse(), tag, " ")}</tags>
<spec>{spec((obj.specs || obj.names)[0])}</spec>{
!obj.type ? "" : <>
<type>{obj.type}</type>
@@ -721,7 +721,7 @@ const Dactyl = Module("dactyl", {
})</>
}</>
]));
return res.*.toXMLString().replace(/^ {12}/gm, "");;
return res.*.toXMLString().replace(/^ {12}|[ \t]+$/gm, "");
},
/**

View File

@@ -969,11 +969,9 @@ const Events = Module("events", {
this._input.motionCount = null;
if (!isEscape(key)) {
stop = false;
if (mode.main === modes.TEXT_EDIT) {
stop = (mode.main === modes.TEXT_EDIT);
if (stop)
dactyl.beep();
stop = true;
}
if (mode.main === modes.COMMAND_LINE)
if (!(mode.extended & modes.INPUT_MULTILINE))

View File

@@ -28,7 +28,8 @@ const RangeFinder = Module("rangefinder", {
let highlighted = this.rangeFind && this.rangeFind.highlighted;
let selections = this.rangeFind && this.rangeFind.selections;
let regexp = false;
let matchCase = options["smartcase"] && /[A-Z]/.test(str) || !options["ignorecase"];
let matchCase = options["searchcase"] === "smart" ? /[A-Z]/.test(str) :
options["searchcase"] === "ignore" ? false : true;
let linksOnly = options["linksearch"];
str = str.replace(/\\(.|$)/g, function (m, n1) {
@@ -218,9 +219,16 @@ const RangeFinder = Module("rangefinder", {
}
});
options.add(["ignorecase", "ic"],
"Ignore case in search patterns",
"boolean", true);
options.add(["searchcase", "sc"],
"Search case matching mode",
"string", "smart",
{
completer: function () [
["smart", "Case is significant when capital letters are typed"],
["match", "Case is always significant"],
["ignore", "Case is never significant"]
]
});
options.add(["incsearch", "is"],
"Show where the search pattern matches as it is typed",
@@ -230,9 +238,6 @@ const RangeFinder = Module("rangefinder", {
"Limit the search to hyperlink text",
"boolean", false);
options.add(["smartcase", "scs"],
"Override the 'ignorecase' option if the pattern contains uppercase characters",
"boolean", true);
}
});