Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Rich Lane <rlane@club.cc.cmu.edu>
To: Mark Alexander <marka@pobox.com>
Cc: Sup issue tracker <sup-bugs@masanjin.net>,
	Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [issue53] Error if the composed text has tabs in the first character
Date: Wed, 27 Jan 2010 17:29:09 -0500	[thread overview]
Message-ID: <1264629880-sup-9232@zyrg.net> (raw)
In-Reply-To: <a412e2a71001271357p2885d513k838587576febecb1@mail.gmail.com>

Excerpts from Mark Alexander's message of 2010-01-27 16:57:33 -0500:
> I've been noticing this problem for a long time now.
> I think it happens with tabs anywhere in the
> message, or perhaps at the beginning of lines,
> but I haven't played with it enough to know for sure.

Sup assumes that 1 codepoint == 1 screen cell. This also causes problems
with double-width Chinese(?) characters. William has suggested using
wc[s]width, and now that we've got our own fork of ncurses-ruby we might
as well stick it in there. I looked at it briefly and iirc the
troublesome part was getting a wchar_t from the bytes in a Ruby string.

Tabs are funny because their width depends on their position. I say
replace all tabs with 2 spaces before calling ncurses.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


  reply	other threads:[~2010-01-27 22:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 21:11 Anirudh Sanjeev
2010-01-27 21:57 ` Mark Alexander
2010-01-27 22:29   ` Rich Lane [this message]
2010-01-27 22:15 ` Tero Tilus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1264629880-sup-9232@zyrg.net \
    --to=rlane@club.cc.cmu.edu \
    --cc=marka@pobox.com \
    --cc=sup-bugs@masanjin.net \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox