[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: Arabic vim patch (was - BAD BUG)
- To: "Antoine J. Mechelynck" <antoine dot mechelynck at belgacom dot net>
- Subject: Re: Re: Arabic vim patch (was - BAD BUG)
- From: Bram Moolenaar <Bram at moolenaar dot net>
- Date: Thu, 20 Feb 2003 20:10:03 +0100
- Cc: digitect at mindspring dot com
- Cc: "Nadim Shaikli" <shaikli at yahoo dot com>, developer at arabeyes dot org, vim at vim dot org
Antoine J. Mechelynck wrote:
> digitect at mindspring dot com wrote:
> > on 2/18/2003 2:39 PM Bram Moolenaar said the following:
> > > Antoine J. Mechelynck wrote:
> > > >
> > > > Conclusion: The culprit seems to be some patch between 300
> > > > (excluded) and 320 (included).
> > >
> > > Try excluding patch 303.
> >
> > You can try this Windows binary:
> >
> > http://cream.sf.net/vim61-320minus303.zip
>
> Looks like I'm going to play the guinea pig then? Well, this one has the
> glyphs. Thanks Bram for pinning down the guilty patch. Now if that patch's
> (303) functionality is still needed, the problem remains of how to have it
> not break the displaying of Arabic glyphs (and maybe others, which I didn't
> test) in UTF-8.
Well, since we don't seem to make progress in actually solving the
problem, I'm trying a brute force method: Don't use ETO_PDY when
'rightleft' is set. This won't work if you have two windows, the
current one has 'norightleft' and the other with 'rightleft' is redrawn
(CTRL-L). But it's better than nothing....
*** gui_w32.c~ Mon Feb 17 21:29:23 2003
--- gui_w32.c Thu Feb 20 18:52:11 2003
***************
*** 1779,1786 ****
cells = 0;
/* Add ETO_PDY to make characters fit as we expect, even when the font
! * uses different widths (e.g., bold character is wider). */
! if (unicodepdy != NULL)
foptions |= ETO_PDY;
for (clen = 0; i < len; )
{
--- 1779,1788 ----
cells = 0;
/* Add ETO_PDY to make characters fit as we expect, even when the font
! * uses different widths (e.g., bold character is wider).
! * HACK: Apparently this causes trouble when 'rightleft' is set. This
! * is just guessing! */
! if (unicodepdy != NULL && !curwin->w_p_rl)
foptions |= ETO_PDY;
for (clen = 0; i < len; )
{
***************
*** 1788,1794 ****
cw = utf_char2cells(unicodebuf[clen]);
if (cw > 2) /* don't use 4 for unprintable char */
cw = 1;
! if (unicodepdy != NULL)
{
unicodepdy[clen * 2] = cw * gui.char_width;
unicodepdy[clen * 2 + 1] = 0;
--- 1790,1796 ----
cw = utf_char2cells(unicodebuf[clen]);
if (cw > 2) /* don't use 4 for unprintable char */
cw = 1;
! if (unicodepdy != NULL && !curwin->w_p_rl)
{
unicodepdy[clen * 2] = cw * gui.char_width;
unicodepdy[clen * 2 + 1] = 0;
--
I have to exercise early in the morning before my brain
figures out what I'm doing.
/// Bram Moolenaar -- Bram at Moolenaar dot net -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///