Summary: | Web Inspector: Support for :lineNumber syntax in Open Resource Dialog | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bburg, commit-queue, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=160825 | ||||||||||
Attachments: |
|
Description
Nikita Vasilyev
2016-07-13 12:09:04 PDT
In ST2+, just :nnn will seek to that line within the current text editor. Created attachment 285251 [details] [Animated GIF] ":123" doesn't jump to line 123 (In reply to comment #1) > In ST2+, just :nnn will seek to that line within the current text editor. Doesn't work for me. Similar to Chrome and Sublime, we should also bring up the dialog pre-populated with a ":" when pressing Control-G. Removing the colon should return the dialog to Quick Open mode. Easy enough to do. Textmate supports all kinds of syntax: • basic position ":<line>:<column>" • multiple cursors ":10:0&:11:0" • ranges ":10:0-:11:0" But I think for starters basic positions will work fine. I have this working, I just need to clean the code up a bit. Created attachment 285881 [details]
[PATCH] Proposed Fix
Comment on attachment 285881 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=285881&action=review Works great! > Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:164 > + let [_, lineNumber, columnNumber] = this._inputElement.value.split(":"); Placeholders aren't necessary to ignore destructured return values. Comment on attachment 285881 [details]
[PATCH] Proposed Fix
Would be nice to focus on a CodeMirror instance after ":<line>:<column>" query is entered, so I could type right away.
(In reply to comment #7) > Comment on attachment 285881 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=285881&action=review > > Works great! > > > Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:164 > > + let [_, lineNumber, columnNumber] = this._inputElement.value.split(":"); > > Placeholders aren't necessary to ignore destructured return values. Oh snap! (In reply to comment #8) > Comment on attachment 285881 [details] > [PATCH] Proposed Fix > > Would be nice to focus on a CodeMirror instance after ":<line>:<column>" > query is entered, so I could type right away. I agree and almost tackled it with this patch. In the end, focusing is a more generic problem that I think could be handled in a separate patch. Maybe its as easy as adding a field to the cookie (alongside lineNumber/columnNumber) or maybe showing text content views should always focus when shown. Created attachment 285927 [details]
[PATCH] For Landing
Comment on attachment 285927 [details] [PATCH] For Landing Clearing flags on attachment: 285927 Committed r204418: <http://trac.webkit.org/changeset/204418> Closing manually. I don't know why it didn't get closed after committing. |