[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multi-line field issues
From: |
Thomas Dickey |
Subject: |
Re: multi-line field issues |
Date: |
Sat, 18 Oct 2008 12:40:54 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Sep 23, 2008 at 10:02:36AM +0530, Sentinel wrote:
> Hello,
>
> I am writing an app that uses multi-line fields. I noticed 2 things:
>
> a) ML fields do not store newlines. The output is padded to width. Thus
> while using elsewhere it needs to be worked on.
>
> b) similarly when putting data into an ML field using set_field_buffer,
> all data was being rejected, until I found this has to do with newlines.
>
> I have worked around both these, by splitting and adding newlines while
> saving, and removing newlines and padding while setting. Is this the
> normal practice ?
yes/no: the behavior is longstanding in ncurses (1996).
I can see that Solaris curses allows newlines (am not 100% sure it's doing
it properly, but will see). I'm modifying ncurses to accept newlines
(the impact of the change seems to be only within that function).
Beyond that - it seems that buffer-0 will always be padded with blanks
and contain no literal newlines. The other buffers may (depending on
above related to Solaris - and I can test with an old SCO system)
contain literal newlines.
> Is this behaviour likely to be "fixed" in the near future so we don;t
> have to do the above.
>
> (I am using the latest ncurses on OS X - updated through port install).
>
> btw, as a background, I am writing an application generator using DSL
> input (domain specific language). It is coming up very well. I will have
> some questions as I go along.
>
>
> --
> ruby 1.8.7 | os x 10.5.4 | vim 7
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ncurses
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature