On Mon, Jun 05, 2023 at 06:19:40AM +0300, Yuri Kanivetsky 
<yuri.kanivet...@gmail.com> wrote:
> The following change
> 
> http://cvs.schmorp.de/rxvt-unicode/src/screen.C?r1=1.464&r2=1.465
> 
> makes urxvt start with empty lines before the prompt.

Not exactly - it does it under more circumstances now, but the general
behaviour has not changed. Old versions of urxvt (and other termninals)
can show the same behaviour as now, its just not triggered as often.

> From what can be
> found on the net, the change fixes some readline issues:

No, it's not a change - the cursor row has to be adjusted so that the cursor
stays in the same ("virtual") line, which might be in a different row after
resizing.

What happens is a race condition between urxvt starting and the window
manager resizing the window - before, lines were usually scrolled in from
the bottom for long enough that the undesirable behaviour did not treigger.
Now lines are scrolled in from the top (which is the normal behaviour).

To help you understand, when you start the terminal and enlarge it
vertically, you either get fresh lines added at the bottom (desirable when
intially opening and resizing immediatelly) or at the top (the normal
behaviour - when you enlarge your window and your cursor is at the bottom
for example, you want old scrollback to become visible when enlarging).

What happens is that due to some bugfixes, the scorll-in-from-top behaviour
is triggered essentially every time when a wm resizes the window.

"fixing" this clearly undesirable behaviour is not that easy, as its
not clear what the correct behaviour should be in all cases, and how to
implement it (in fact, there are a number of incompatible behaviours that
actually are desirable, so this might end up being one or two optionsa).

> > 22:19:31 (schmorp) nmeum: basically, if you start it, and resize it, the 
> > prompt now stays on the line it was before
> > 22:19:45 (schmorp) nmeum: which fixes a bunch of readline issues, where 
> > readline does not expect to be moved around
> > 22:19:56 (schmorp) nmeum: that *likely* is the issue here
> 
> If that's the case, what does he or you mean by "line it was before"?

The line containing the text that the cursor was in before resize should
be the line that the cursor is after resize (which might be somewhere else
in the window after the resize).

> >From what I can see what doesn't change on resize is the number of
> lines after the prompt, not before the prompt.
> 
> Can you also describe one of these readline issues in a way that I
> could reproduce it?

When the cursor moves to a different line and readline redraws its prompt it
wilkl splatter prompts all over the terminal on resize.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schm...@schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
rxvt-unicode mailing list
rxvt-unicode@lists.schmorp.de
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to