[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes in frame/window code
From: |
Eli Zaretskii |
Subject: |
Re: Changes in frame/window code |
Date: |
Tue, 29 Jul 2014 13:23:01 +0300 |
> Date: Tue, 29 Jul 2014 12:41:02 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
>
> > > You need to reverse the meaning of START and END for the R2L case:
> > >
> > > end = whole - w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w));
> > > start = end - box_width;
> > >
> > > (Note that current-bidi-paragraph-direction returns the results at
> > > buffer's point, so you will need to temporarily go to the window's
> > > point marker.)
> >
> > As soon as you have some spare time (I know you never do) please try it.
>
> I can only try this on MS-Windows.
The patch below almost works. "Almost" because of 2 issues that still
need to be taken care of:
. As soon as I click on the scroll-bar thumb, which is correctly
drawn flushed all the way to the right when point is an a R2L line,
the scroll bar "jumps" to the left edge. Where's the code which
does that?
. The code below is for the selected window, where point is up to
date. But what about non-selected windows, should we use
window-point there?
=== modified file 'src/xdisp.c'
--- src/xdisp.c 2014-07-27 13:21:30 +0000
+++ src/xdisp.c 2014-07-29 10:17:58 +0000
@@ -15814,6 +15814,17 @@ set_horizontal_scroll_bar (struct window
left. */
whole = max (whole, w->hscroll + box_width);
whole = max (whole, end - start);
+ if (it.bidi_p)
+ {
+ Lisp_Object pdir;
+
+ pdir = Fcurrent_bidi_paragraph_direction (Qnil);
+ if (EQ (pdir, Qright_to_left))
+ {
+ end = whole - w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w));
+ start = end - box_width;
+ }
+ }
if (old_buffer)
set_buffer_internal (old_buffer);
- Re: Changes in frame/window code, (continued)
- Message not available
- Re: Changes in frame/window code, martin rudalics, 2014/07/28
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/28
- Re: Changes in frame/window code, martin rudalics, 2014/07/28
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/28
- Re: Changes in frame/window code, martin rudalics, 2014/07/28
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/28
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code,
Eli Zaretskii <=
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, martin rudalics, 2014/07/29
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/29
- Re: Changes in frame/window code, martin rudalics, 2014/07/30
- Re: Changes in frame/window code, Eli Zaretskii, 2014/07/30