From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.28.69 with SMTP id l5cs287306ebc; Wed, 27 Jan 2010 14:29:17 -0800 (PST) Received: by 10.101.132.32 with SMTP id j32mr13131003ann.48.1264631356766; Wed, 27 Jan 2010 14:29:16 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 24si785184gxk.41.2010.01.27.14.29.16; Wed, 27 Jan 2010 14:29:16 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 177671858333; Wed, 27 Jan 2010 17:29:16 -0500 (EST) Received: from pion.club.cc.cmu.edu (PION.CLUB.CC.cmu.edu [128.237.157.88]) by rubyforge.org (Postfix) with ESMTP id 33511185831C for ; Wed, 27 Jan 2010 17:29:14 -0500 (EST) Received: from rlane by pion.club.cc.cmu.edu with local (Exim 4.69) (envelope-from ) id 1NaGNp-0006J2-KX; Wed, 27 Jan 2010 17:29:09 -0500 From: Rich Lane To: Mark Alexander In-reply-to: References: <1264626708.47.0.495243760209.issue53@masanjin.net> Date: Wed, 27 Jan 2010 17:29:09 -0500 Message-Id: <1264629880-sup-9232@zyrg.net> User-Agent: Sup/git Cc: Sup issue tracker , Sup developer discussion Subject: Re: [sup-devel] [issue53] Error if the composed text has tabs in the first character X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org 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