Skip to content

Commit fb640ef

Browse files
committed
Merge branch 'master' into fix-abclear
* master: fix command line Shift+Insert paste on Linux Fix #444: Honor hlsearch on n/N fix Shift+Insert paste on Linux use saniztizer based on app platform version, #556 Remove asciidoc.conf Remove regressions.js Fix #259: Command prompt selection sometimes cleared Fix misspellings (#546) Optimize vimperator-labs-white.png and about_background.png, reduce file size with optipng Disallow units for zero values (#541) help.css: Disallow overqualified elements (#540)
2 parents 33cc038 + 71e029e commit fb640ef

File tree

21 files changed

+73
-425
lines changed

21 files changed

+73
-425
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ Testing/Optimization
210210
**TODO:**
211211

212212
- Add some information here about testing/validation/etc.
213-
- Information about how/when to use `:regressions` might be nice.
214213
- Additionally, maybe there should be some benchmark information here,
215214
something to let a developer know what's "too" slow...? Or general guidelines
216215
about optimization?
-1.02 KB
Loading

common/asciidoc.conf

Lines changed: 0 additions & 124 deletions
This file was deleted.

common/content/commandline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ const CommandLine = Module("commandline", {
12701270
this._lastSubstring = substring;
12711271

12721272
let value = this.completion;
1273-
if (util.compareIgnoreCase(value, substring.substr(0, value.length)))
1273+
if (value.length == substring.length || util.compareIgnoreCase(value, substring.substr(0, value.length)))
12741274
return;
12751275
substring = substring.substr(value.length);
12761276
this.removeSubstring = substring;

common/content/completion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ const CompletionContext = Class("CompletionContext", {
617617
* @param {boolean} interruptible When true, the call may be interrupted
618618
* via <C-c>, in which case, "Interrupted" may be thrown.
619619
* @param {number} timeout The maximum time, in milliseconds, to wait.
620-
* If 0 or null, wait indefinately.
620+
* If 0 or null, wait indefinitely.
621621
*/
622622
wait: function wait(interruptable, timeout) {
623623
let end = Date.now() + timeout;

common/content/editor.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ const Editor = Module("editor", {
7070
return;
7171
}
7272

73+
// clear completion preview so it does not get turned into regular text
74+
if (commandline._completions)
75+
commandline._completions.previewClear();
76+
7377
let elem = liberator.focus;
7478

7579
if (elem.setSelectionRange && util.readFromClipboard()) {
@@ -83,13 +87,18 @@ const Editor = Module("editor", {
8387
let rangeEnd = elem.selectionEnd;
8488
let tempStr1 = elem.value.substring(0, rangeStart);
8589
let tempStr2 = util.readFromClipboard();
86-
elem.value = tempStr1 + tempStr2;
90+
let tempStr3 = elem.value.substring(rangeEnd);
91+
elem.value = tempStr1 + tempStr2 + tempStr3;
8792
elem.selectionStart = rangeStart + tempStr2.length;
8893
elem.selectionEnd = elem.selectionStart;
8994

9095
elem.scrollTop = curTop;
9196
elem.scrollLeft = curLeft;
9297
}
98+
99+
// update completion preview as would happen with Ctrl+v or mouse paste
100+
if (commandline._completions && options.autocomplete)
101+
commandline._completions.complete(true, false);
93102
},
94103

95104
// count is optional, defaults to 1

common/content/finder.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ var Finder = Module("finder", {
181181
this.findbar._vimp_keepClosed = true;
182182

183183
this.findbar.onFindAgainCommand(reverse);
184+
185+
if (options.hlsearch) {
186+
this.highlight();
187+
}
184188
},
185189

186190
/**
@@ -253,13 +257,18 @@ var Finder = Module("finder", {
253257
},
254258

255259
/**
256-
* Highlights all occurances of <b>str</b> in the buffer.
260+
* Highlights all occurrences of <b>str</b> in the buffer.
257261
*/
258262
highlight: function () {
259263
this.setupFindbar();
260264
let findbar = this.findbar;
261265

262266
let btn = findbar.getElement("highlight");
267+
268+
if (btn.checked) {
269+
return;
270+
}
271+
263272
btn.checked = true;
264273

265274
findbar._setHighlightTimeout();

common/content/help.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
div.main {
1+
.main {
22
font-family: -moz-fixed;
33
white-space: -moz-pre-wrap;
44
width: 800px;
@@ -10,7 +10,7 @@ h1 {
1010
text-align: center;
1111
}
1212

13-
p.tagline {
13+
.tagline {
1414
text-align: center;
1515
font-weight: bold;
1616
}
@@ -25,7 +25,7 @@ table.vimperator td {
2525
border: none;
2626
padding: 3px;
2727
}
28-
tr.separator {
28+
.separator {
2929
height: 10px;
3030
}
3131
hr {
@@ -42,39 +42,39 @@ td.taglist {
4242
}
4343
td.taglist td {
4444
width: 100px;
45-
padding: 3px 0px;
45+
padding: 3px 0;
4646
}
4747
tr.taglist code, td.usage code {
48-
margin: 0px 2px;
48+
margin: 0 2px;
4949
}
5050
td.usage code {
5151
white-space: nowrap;
5252
}
5353
td.taglist code {
5454
margin-left: 2em;
5555
}
56-
code.tag {
56+
.tag {
5757
font-weight: bold;
5858
color: rgb(255, 0, 255); /* magenta */
5959
padding-left: 5px;
6060
}
61-
tr.description {
61+
.description {
6262
margin-bottom: 4px;
6363
}
64-
table.commands {
64+
.commands {
6565
background-color: rgb(250, 240, 230);
6666
color: black;
6767
}
68-
table.mappings {
68+
.mappings {
6969
background-color: rgb(230, 240, 250);
7070
color: black;
7171
}
72-
table.options {
72+
.options {
7373
background-color: rgb(240, 250, 230);
7474
color: black;
7575
}
7676

77-
fieldset.paypal {
77+
.paypal {
7878
border: none;
7979
}
8080

common/content/hints.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const Hints = Module("hints", {
207207
let leftBound = Infinity;
208208
let topBound = Infinity;
209209

210-
// First find the top-left corner of the bounding rectangle (offset from image topleft can be noticably suboptimal)
210+
// First find the top-left corner of the bounding rectangle (offset from image topleft can be noticeably suboptimal)
211211
for (let i = 0; i < coords.length; i += 2) {
212212
leftBound = Math.min(coords[i], leftBound);
213213
topBound = Math.min(coords[i + 1], topBound);
@@ -844,8 +844,8 @@ const Hints = Module("hints", {
844844
/**
845845
* Get a hint matcher for hintmatching=fuzzy
846846
*
847-
* The user input can be anything. The matcher looks for occurances of
848-
* the characters in the user input. If all occurances are found in the
847+
* The user input can be anything. The matcher looks for occurrences of
848+
* the characters in the user input. If all occurrences are found in the
849849
* link, in order, the link is relevant.
850850
*
851851
* @param {string} hintString The string typed by the user.

common/content/javascript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ const JavaScript = Module("javascript", {
432432
_getKey: function () {
433433
if (this._last == "")
434434
return "";
435-
// After the opening [ upto the opening ", plus '' to take care of any operators before it
435+
// After the opening [ up to the opening ", plus '' to take care of any operators before it
436436
let key = this._str.substring(this._get(-2, 0, "statements"), this._get(-1, null, "offset")) + "''";
437437
// Now eval the key, to process any referenced variables.
438438
return this.eval(key);
@@ -496,7 +496,7 @@ const JavaScript = Module("javascript", {
496496
if (this._get(-3, 0, "statements") == this._get(-2).offset)
497497
return null;
498498

499-
// Beginning of the statement upto the opening [
499+
// Beginning of the statement up to the opening [
500500
let obj = this._getObj(-3, this._get(-2).offset);
501501

502502
return this._complete(obj, this._getKey(), null, string, this._last);

0 commit comments

Comments
 (0)