bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] rl_insert_text() insert only one line


From: Chet Ramey
Subject: Re: [Bug-readline] rl_insert_text() insert only one line
Date: Mon, 16 May 2016 10:42:08 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.0

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]