Javascript icon indicating copy to clipboard operation
Javascript copied to clipboard

Eval editor contents only displays result for one expression.

Open doxxx opened this issue 11 years ago • 4 comments

When I use Ctrl-Shift-Enter in a Javascript file, the tick mark only appears on the first form in the file. I can eval individual forms using Ctrl-Enter.

doxxx avatar Jan 19 '14 16:01 doxxx

When using Ctrl-Shift-Enter, I do see the whole file evaled but only the bottom expression has an inline widget. The example I verified was this:

var k = 1;
k
var w = k + 4;
w

The inline widget only appeared on the w. We should be showing multiple inline results like we do for clojure. Marking as a bug unless @ibdknox knows a reason why this isn't possible

cldwalker avatar Nov 07 '14 13:11 cldwalker

Are you using the latest JavaScript mode? Pretty sure I added this. On Fri, Nov 7, 2014 at 5:35 AM Gabriel Horner [email protected] wrote:

When using Ctrl-Shift-Enter, I do see the whole file evaled but only the bottom expression has an inline widget. The example I verified was this:

var k = 1; kvar w = k + 4; w

The inline widget only appeared on the w. We should be showing multiple inline results like we do for clojure. Marking as a bug unless @ibdknox https://github.com/ibdknox knows a reason why this isn't possible

— Reply to this email directly or view it on GitHub https://github.com/LightTable/Javascript/issues/3#issuecomment-62143480.

ibdknox avatar Nov 07 '14 16:11 ibdknox

Yep. The example I gave was on a fresh clone from master

cldwalker avatar Nov 07 '14 16:11 cldwalker

If you put newlines between the lines it works, so this appears to be something to do with result placement.

ibdknox avatar Nov 07 '14 19:11 ibdknox