Re: Re: Slyedit
By: deon to Digital Man on Fri Jan 22 2021 02:11 pm
> Re: Re: Slyedit
> By: Digital Man to deon on Thu Jan 21 2021 06:05 pm
>
> DM> Currently, in JS, a console.inkey() timeout looks the same as the
> DM> receipt of a NUL (ASCII 0) from the user.
> DM> I just committed a change so that a script can use a new mode flag
> DM> (K_NUL) to differentiate between the 2 conditions and SlyEdit could
> DM> make use of that. Or he could just ignore the empty string result of
> DM> console.inkey().
>
> Ahh, OK, great, thanks.
>
> I'll wait for Nightfox to make some changes (or Nightfox if you can tell me
> which lines to play with, I can have a go and see if this change helps -
> will save me having to find and learn your code :)
These appear to be the relevant lines, in SlyEdit.js:
// If userInput is blank, then the input timeout was probably
// reached, so abort.
else if (userInput == "")
{
returnCode = 1; // Aborted
continueOn = false;
console.crlf();
console.print("\1n\1h\1r" + EDITOR_PROGRAM_NAME + ": Input timeout reached.");
continue;
}
--
digital man
Sling Blade quote #16:
Karl Childers (to Doyle, re: lawn mower blade): I aim to kill you with it. Mmm.
Norco, CA WX: 55.2øF, 70.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs
--- SBBSecho 3.12-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|