Changeset 237232 in webkit
- Timestamp:
- Oct 17, 2018 12:46:54 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r237212 r237232 1 2018-10-17 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Quickly Open to line/column does should have caret indicating where the position is 4 https://bugs.webkit.org/show_bug.cgi?id=190643 5 6 Reviewed by Matt Baker. 7 8 * UserInterface/Views/TextEditor.js: 9 (WI.TextEditor.prototype.set selectedTextRange): 10 (WI.TextEditor.prototype.revealPosition): 11 Ensure that CodeMirror is focused before attempting to `setSelection`. 12 Drive-by: allow selections past the "end" of the line (since there is a `\n` or `\r`). 13 14 * UserInterface/Views/SourceCodeTextEditor.js: 15 (WI.SourceCodeTextEditor.prototype.dialogWasDismissedWithRepresentedObject): 16 Remove the extra `focus` call after dismissing the `WI.GoToLineDialog` since it is now 17 handled by `WI.TextEditor` via `revealPosition`. 18 1 19 2018-10-16 Joseph Pecoraro <pecoraro@apple.com> 2 20 -
trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js
r237212 r237232 280 280 let position = new WI.SourceCodePosition(lineNumber - 1, 0); 281 281 let range = new WI.TextRange(lineNumber - 1, 0, lineNumber, 0); 282 283 282 this.revealPosition(position, range, false, true); 284 this.focus();285 283 } 286 284 -
trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js
r237145 r237232 229 229 { 230 230 var position = this._codeMirrorPositionFromTextRange(textRange); 231 this.focus(); 231 232 this._codeMirror.setSelection(position.start, position.end); 232 233 } … … 521 522 522 523 if (!textRangeToSelect) { 523 let column = Number.constrain(position.columnNumber, 0, this._codeMirror.getLine(line).length - 1);524 let column = Number.constrain(position.columnNumber, 0, this._codeMirror.getLine(line).length); 524 525 textRangeToSelect = new WI.TextRange(line, column, line, column); 525 526 }
Note: See TracChangeset
for help on using the changeset viewer.