NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/53682: libedit writes padding, not newline, to terminal when restoring a multi-line history entry



The following reply was made to PR lib/53682; it has been noted by GNATS.

From: Leonardo Taccari <leot%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/53682: libedit writes padding, not newline, to terminal when restoring a multi-line history entry
Date: Thu, 25 Oct 2018 09:36:43 +0200

 Hello Jordan,
 
 jordan%cockroachlabs.com@localhost writes:
 > >Number:         53682
 > >Category:       lib
 > >Synopsis:       libedit writes padding, not newline, to terminal when r=
 estoring a multi-line history entry
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    lib-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Oct 25 00:40:00 +0000 2018
 > >Originator:     Jordan Lewis
 > >Release:        latest
 > [...]
 > #include <stdio.h>
 > #include <stdlib.h>
 > #include <editline/readline.h>
 >
 > int main(int argc, char** argv) {
 >   add_history("this history line has an\nembedded newline");
 >   while (1) {
 >     char* input =3D readline("demo (press up to see bug)> ");
 >     add_history(input);
 >     printf("Got input: %s\n", input);
 >     /* free input */
 >     free(input);
 >   }
 >   return 0;
 > }
 > [...]
 
 On NetBSD-current - after adjusting the include from <editline/readline.h>
 to <readline/readline.h> it seems that running that there is a
 "\n".
 
 On which NetBSD version this happens?
 
 If it's not on NetBSD and there are any $NetBSD$ RCS Id in the
 editline source code and headers or similar please share them: it
 can help to possible bisect the problem.
 
 
 Thank you!
 


Home | Main Index | Thread Index | Old Index