LightTable / Javascript

Javascript language plugin for Light Table
MIT License
56 stars 79 forks source link

Eval editor contents only displays result for one expression. #3

Open doxxx opened 10 years ago

doxxx commented 10 years ago

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.

cldwalker commented 9 years ago

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

ibdknox commented 9 years ago

Are you using the latest JavaScript mode? Pretty sure I added this. On Fri, Nov 7, 2014 at 5:35 AM Gabriel Horner notifications@github.com 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.

cldwalker commented 9 years ago

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

ibdknox commented 9 years ago

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