SWI-Prolog/swish

Pengine Dies and Notebook jumps to it.

PaulBrownMagic opened this issue · 3 comments

I wrote a long notebook that takes some time to work through. I noticed if I'd run a query near the top and left the Pengine thread open, when I was in the middle of reading something complicated halfway down the page and the Pengine died, I was suddenly scrolled up to that old query.

This is rather annoying and I think it would be better for Pengines to die quietly, especially when using SWISH notebooks for study.

I tried reading the source code to find the relevant part, I believe if deleting line 1231 in runner.js will stop the behaviour:

if ( !aliveState(state) ) {
       var elem = this;
       $(".prolog-editor").trigger('pengine-died', data.prolog.id);
       data.prolog.destroy();
       setTimeout(function() { elem.trigger('scroll-to-bottom') }, 100); // delete this?

Deleting might work. This functionality is indeed something annoying and sometimes useful. The latter notably if you are doing serious things with SWISH and do not like to wait for some long running query. Deleting might suite more users, at least for now.

Let's find out what might suit more users. I put a poll in the discourse.

Do you have a link to the poll?