Re: Mixed L2R and R2L paragraphs and horizontal scroll

Stefan Monnier <[email protected]>
Newsgroups gmane.emacs.devel,gmane.emacs.bidi
Message-ID <[email protected]>
> Here's a peculiar design decision that needs to be made for the bidi
> display: how to display horizontally scrolled lines in a buffer with
> mixed L2R and R2L paragraphs.

That's a tricky question indeed.  I don't know if there are other text
editors with similar problems from which to get inspiration.

So it seems we have 3 options:
- "saturated scrolling" where hscroll can be positive or negative and
  l2r lines won't scroll at all when hscroll is negative and vice-versa.
- "inverted scrolling" where hscroll is always positive and is
  interpreted as scrolling in the direction of the line, so the
  direction can change from one line to the next.
- "rigid scrolling" where the window-width determines the distance
  between l2r's leftmost position and r2l's rightmost position and then
  the text is taken as extending both left and right from those, so
  hscroll can be positive or negative and lines can be scrolled "before
  their beginning".

Inverted scrolling seem to be easier to implement.  It has the downside
that C-x > will scroll "the other way" in R2L contexts, but maybe it's
not that terrible: there's always a source of confusion when talking
about scrolling direction anyway, because we can either think of
scrolling the text under a fixed window, or scrolling a window over
a fixed text.


        Stefan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.