On 5/13/16 5:12 PM, Cade Foster wrote:

> Compilation commands:
> 
> tar --extract --file readline-master.tar.gz --gzip
> cd readline-master/
> ./configure
> make
> cd ..
> 
> gcc -c rl.c -o rl.o
> gcc rl.o ./readline-master/libreadline.a -o rl
> 
> Usage of rl:
> rl [-p prompt] [-u unit] [-d default] [-n nchars]
> 
> Assume you terminal width is 10 columns.
> When command
> 
> ./rl -p '> ' -d '0123456789'
> 
> will print single line
> 
> 89|01234567
> 
> but expected result is printing two lines
> 
>> 01234567
> 89|
> 
> where vertical bar "|" is cursor position.
> 
> Problem: function rl_insert_text()
> can't insert long text on multiple lines.

Try linking with ncurses or termcap/termlib so readline knows how to move
around the terminal.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to