Skip to content

Commit 97cca38

Browse files
Web Inspector: Should not try to autocomplete subsections of a string
https://bugs.webkit.org/show_bug.cgi?id=181461 <rdar://problem/36369421> Patch by Joseph Pecoraro <[email protected]> on 2018-01-10 Reviewed by Brian Burg. * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Disable autocompletion within strings. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@226728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 52e5aa6 commit 97cca38

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Source/WebInspectorUI/ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2018-01-10 Joseph Pecoraro <[email protected]>
2+
3+
Web Inspector: Should not try to autocomplete subsections of a string
4+
https://bugs.webkit.org/show_bug.cgi?id=181461
5+
<rdar://problem/36369421>
6+
7+
Reviewed by Brian Burg.
8+
9+
* UserInterface/Controllers/CodeMirrorCompletionController.js:
10+
(WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
11+
Disable autocompletion within strings.
12+
113
2018-01-09 Joseph Pecoraro <[email protected]>
214

315
REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal

Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ WI.CodeMirrorCompletionController = class CodeMirrorCompletionController extends
475475
var cursor = this._codeMirror.getCursor();
476476
var token = this._codeMirror.getTokenAt(cursor);
477477

478-
// Don't try to complete inside comments.
479-
if (token.type && /\bcomment\b/.test(token.type)) {
478+
// Don't try to complete inside comments or strings.
479+
if (token.type && /\b(comment|string)\b/.test(token.type)) {
480480
this.hideCompletions();
481481
return;
482482
}

0 commit comments

Comments
 (0)