develooper Front page | perl.perl5.porters | Postings from March 2000

gnu readline question (bug or proper behavior?)

Joseph N. Hall
March 19, 2000 21:10
gnu readline question (bug or proper behavior?)
Message ID:
Unless I manipulate the insertion point after insert/delete operations,
Term::ReadLine::Gnu goes weird because it apparently doesn't bother
making the insertion point sane afterward.  I have no experience using 
readline in C to compare this against.  Is the following correct:

  $term->Attribs->{point} = 0;
  $term->Attribs->{point} = length $term->Attribs->{line_buffer};

Can I manipulate the buffer directly?  If so, what do I do to get undo
to work?  I tried a variety of things but maybe I missed an obvious
solution.  (Well, semi-obvious anyway, because neither 
Term::ReadLine::Gnu nor the GNU readline documentation is in any way
clear on this type of operation.)


Joseph N. Hall, 5 Sigma Productions        mailto:" <joseph> "
Author, Effective Perl Programming . . . . . Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About