Bug 115987

Summary: think about how auto-NLs in console can be improved
Product: WebKit Reporter: Paul Miller <paul+bugs>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Paul Miller 2013-05-12 10:45:56 PDT
Been trying to use webkit.app as main browser, my main concern is new auto-creation of newlines instead of executing the statement.

When it indeed allows to improve readability, it’s often that devs write some boilerplate code like `list.filter(function() {})` and then write code inside function and press enter.

With current implementation, I need to press additionally ⌘→ to move to the end of current string and execute the command.

Any ideas on how can this be improved? I write a lot of code in inspector every day and this can be annoying (maybe I ain’t used to it yet tho)
Comment 1 Radar WebKit Bug Importer 2013-05-12 10:46:14 PDT
<rdar://problem/13870951>
Comment 2 Timothy Hatcher 2013-05-12 10:56:55 PDT
Command-Return always executes. Does that work for you?
Comment 3 Paul Miller 2013-05-12 19:04:31 PDT
I guess no as it will also trigger auto-complete (it does currently). Otherwise, yep, probably. Still more annoying than before, but anyway.

In some cases, like strings ('<enter>') the syntax is also invalid.
Comment 4 Timothy Hatcher 2013-05-13 06:46:22 PDT
(In reply to comment #3)
> I guess no as it will also trigger auto-complete (it does currently). Otherwise, yep, probably. Still more annoying than before, but anyway.
> 
> In some cases, like strings ('<enter>') the syntax is also invalid.

It triggering autocomplete is a bug I will fix. Thanks!

You make a good point that enter in the middle of some expressions is not desired and would result in a syntax error. That would be a good improvement. Right now we always insert a newline if the cursor is not at the end of the prompt.
Comment 5 Timothy Hatcher 2013-06-14 07:34:40 PDT
Was fixed 5/14/13 5:12 PM