[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (3) Arabic vim patch (was - BAD BUG)



Steve Hall wrote:

> From: Bram Moolenaar, 02/20/03 02:10 PM
> > 
> > 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....
> 
> [patch snipped]
> 
> Nope, doesn't work for me, this patch actually causes the Arabic patch
> to fail. Nadim has updated (1.12) to sync with 6.1.350 and all is
> fine without it.

Very strange.  Does the Arabic patch change something in the area of
what patch 6.1.303 does?

So far we came to the conclusion that patch 6.1.303 messes up displaying
Arabic.  Since 'rightleft' is set for Arabic text I made the patch
disable the effect of patch 6.1.303 when 'rightleft' is set.  If that
doesn't work then either I made a mistake in the patch or there is
something I don't understand...

Hmm, perhaps the MS-Windows functions don't work as expected.  Passing
the "unicodepdy" buffer without setting the ETO_PDY flag might have some
effect.  Try this change on top of the previous one:

*** gui_w32.c~	Thu Feb 20 18:52:11 2003
--- gui_w32.c	Fri Feb 21 10:34:41 2003
***************
*** 1800,1806 ****
  	    ++clen;
  	}
  	ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
! 			     foptions, pcliprect, unicodebuf, clen, unicodepdy);
  	len = cells;	/* used for underlining */
      }
      else if (is_funky_dbcs)
--- 1800,1807 ----
  	    ++clen;
  	}
  	ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
! 					foptions, pcliprect, unicodebuf, clen,
! 					  curwin->w_p_rl ? NULL : unicodepdy);
  	len = cells;	/* used for underlining */
      }
      else if (is_funky_dbcs)

Note that this is not a real patch, just an attempt to find out what is
going on.  I begin to suspect that ETO_PDY doesn't work with composing
characters.

-- 
GUARD #1:  Where'd you get the coconut?
ARTHUR:    We found them.
GUARD #1:  Found them?  In Mercea?  The coconut's tropical!
ARTHUR:    What do you mean?
GUARD #1:  Well, this is a temperate zone.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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 ///