From: Allin C. <cot...@wf...> - 2011-03-20 20:36:39
|
On Sun, 20 Mar 2011, Bastian Märkisch wrote: > >On Sunday, March 20, 2011, Hans-Bernhard Bröker wrote: > >> On 18.03.2011 10:39, Bastian Märkisch wrote: > >> > > >> > Currently the builtin readline causes gnuplot to terminate > >> > if ^D (DEL) is entered on an empty line. > >> > >> That's been the default behaviour of Unix command line shells since the > >> beginning of time(). Some let you change that, some don't. > >> > >> > Would the following > >> > trivial change have any negative side effect? > >> > >> I suspect it would surprise some long-time users. > > > >Including me :-) > >That's what ^D is supposed to do. It means "End of File". > > > > Ethan > > Ok. The problem is that the builtin readline maps the DEL key > to ^D on Windows. So "DEL" terminates gnuplot there. So you > can accidentally close gnuplot while editing. Hmm. Initially you said that ^D causes gnuplot to exit if it's typed in an empty line (i.e. you're _not_ editing). And that's correct behavior. On the other hand, when in readline editing mode one would generally expect ^D to delete rightwards, as in emacs (unless your readline preference is set to vi-style.) And that's in fact what happens on *nix when libreadline is used. For example, type plot atan(x) and Enter. Then recall the last line with up-arrow, move the cursor onto the first 'a' and press ^D: this turns the line into plot tan(x) Is the behavior on Windows with built-in readline different from that? If so, I think that would be a bug. Allin Cottrell |