Closed UtkarshVerma closed 8 months ago
I have enabled the reflow patch without the scrollback patch.
Yes that is the intended way.
Both of these issues looks to have been addressed in https://github.com/veltza/st-sx so I'll have a closer look and get back to you.
The history buffer is not cut when you do ctrl+l
- presumably it just scrolls all the way down rather than clearing what is in view.
As for the prompt and cursor - it looks like the cursor there is hidden when you start scrolling and it is only revealed again when focus is on the line where the cursor is.
Thanks for reporting.
The code that looks for the last line was accidentally placed inside a conditional compilation block.
Move it out of that block and ctrl+l
should work.
#if KEYBOARDSELECT_PATCH
for (n = term.row-1; n >= 0 && tlinelen(term.line[n]) == 0; n--)
;
#endif // KEYBOARDSELECT_PATCH
veltza is right. It works if I move it outside the KEYBOARDSELECT conditional. However, the prompt issue still persists.
https://github.com/bakkeby/st-flexipatch/assets/31820255/1ef449d6-9111-40a3-990b-85a6dbbbfd0e
This should fix both issues. I haven't fully tested it yet though.
diff --git a/st.c b/st.c
index bc1abf7..5932a3f 100644
--- a/st.c
+++ b/st.c
@@ -2227,10 +2227,8 @@ csihandle(void)
/* vte does this:
tscrollup(0, term.row-1, term.row, SCROLL_SAVEHIST); */
/* alacritty does this: */
- #if KEYBOARDSELECT_PATCH
for (n = term.row-1; n >= 0 && tlinelen(term.line[n]) == 0; n--)
;
- #endif // KEYBOARDSELECT_PATCH
#if SIXEL_PATCH
for (im = term.images; im; im = im->next)
n = MAX(im->y - term.scr, n);
@@ -3695,11 +3693,9 @@ draw(void)
#if KEYBOARDSELECT_PATCH && REFLOW_PATCH
if (!kbds_drawcursor()) {
- #endif // KEYBOARDSELECT_PATCH
-
- #if SCROLLBACK_PATCH
+ #elif REFLOW_PATCH || SCROLLBACK_PATCH
if (term.scr == 0)
- #endif // SCROLLBACK_PATCH
+ #endif // REFLOW_PATCH || SCROLLBACK_PATCH
#if LIGATURES_PATCH
xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
term.ocx, term.ocy, term.line[term.ocy][term.ocx],
Thanks for the changes, veltzo. I tried them out and they work fine. However, I noticed one minor detail. After clearing the screen, an additional line is appended for the prompt, when scrolling back. Do you have an idea of what this could be?
Here's a video:
https://github.com/bakkeby/st-flexipatch/assets/31820255/3e7001a5-f004-41d8-8edb-2245d3ce5e5b
The new prompt line is normal behavior. Please ignore it. Everything works fine.
Thanks again for the assist @veltza
This issue is similar to #46 where the scrollback buffer contents are lost when
Ctrl+l
is pressed.Here are the patches I have enabled.
Important thing is I have enabled the reflow patch without the scrollback patch.
Steps to reproduce
st
.Ctrl+l
and see that the output is lost from the scrollback history.Here's a video of the issue: https://github.com/bakkeby/st-flexipatch/assets/31820255/b92ef36a-494c-4f99-ae1c-472f4def1f5f