Javascript
Javascript copied to clipboard
Eval editor contents only displays result for one expression.
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.
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
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.
Yep. The example I gave was on a fresh clone from master
If you put newlines between the lines it works, so this appears to be something to do with result placement.