WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159732
Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
https://bugs.webkit.org/show_bug.cgi?id=159732
Summary
Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
Nikita Vasilyev
Reported
2016-07-13 12:09:04 PDT
Open Resource Dialog (aka Quick Open) in Sublime Text and Chrome DevTools support "path/to/file.js:lineNumber" syntax. It would be nice if we had it too. Steps: 1. Open Web Inspector on this page. 2. Press Cmd-Shift-O. 3. Enter "global.css:200". Expected: global.css opens on 200th line. Actual: Open Resource Dialog doesn't find any matching files.
Attachments
[Animated GIF] ":123" doesn't jump to line 123
(33.39 KB, image/gif)
2016-08-03 11:08 PDT
,
Nikita Vasilyev
no flags
Details
[PATCH] Proposed Fix
(11.12 KB, patch)
2016-08-11 19:10 PDT
,
Joseph Pecoraro
mattbaker
: review+
Details
Formatted Diff
Diff
[PATCH] For Landing
(11.11 KB, patch)
2016-08-12 12:10 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Blaze Burg
Comment 1
2016-08-03 10:57:18 PDT
In ST2+, just :nnn will seek to that line within the current text editor.
Nikita Vasilyev
Comment 2
2016-08-03 11:08:00 PDT
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.
Matt Baker
Comment 3
2016-08-03 13:26:05 PDT
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.
Radar WebKit Bug Importer
Comment 4
2016-08-03 13:26:26 PDT
<
rdar://problem/27684491
>
Joseph Pecoraro
Comment 5
2016-08-11 01:24:48 PDT
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.
Joseph Pecoraro
Comment 6
2016-08-11 19:10:02 PDT
Created
attachment 285881
[details]
[PATCH] Proposed Fix
Matt Baker
Comment 7
2016-08-11 20:16:40 PDT
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.
Nikita Vasilyev
Comment 8
2016-08-11 22:59:01 PDT
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.
Joseph Pecoraro
Comment 9
2016-08-12 11:24:44 PDT
(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!
Joseph Pecoraro
Comment 10
2016-08-12 11:26:36 PDT
(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.
Joseph Pecoraro
Comment 11
2016-08-12 12:10:05 PDT
Created
attachment 285927
[details]
[PATCH] For Landing
WebKit Commit Bot
Comment 12
2016-08-12 13:36:18 PDT
Comment on
attachment 285927
[details]
[PATCH] For Landing Clearing flags on attachment: 285927 Committed
r204418
: <
http://trac.webkit.org/changeset/204418
>
Nikita Vasilyev
Comment 13
2016-08-12 16:11:08 PDT
Closing manually. I don't know why it didn't get closed after committing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug