Skip to content

Commit f029fbf

Browse files
committed
Remove ghostel--pin-window-start that caused emoji clipping
set-window-start pinning to point-min forced the top of the buffer to be visible, which clipped the bottom when emoji lines expanded line height beyond what window-body-height assumed. Emacs already handles this correctly via scroll-conservatively 101 (set in ghostel-mode): it scrolls minimally to keep point visible, naturally showing the bottom (prompt/cursor) when content overflows. The original viewport drift issue with ink.js TUI apps was fixed by the other changes (render.zig line trimming, line-spacing 0), not by the window-start pinning.
1 parent d335346 commit f029fbf

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

ghostel.el

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,22 +1710,14 @@ frame after idle to improve interactive responsiveness."
17101710
(let ((inhibit-read-only t)
17111711
(inhibit-redisplay t)
17121712
(inhibit-modification-hooks t))
1713-
(ghostel--redraw ghostel--term ghostel-full-redraw)
1714-
(ghostel--pin-window-start)))))))
1715-
1716-
(defun ghostel--pin-window-start ()
1717-
"Pin the window so terminal row 1 stays at the top."
1718-
(let ((win (get-buffer-window)))
1719-
(when win
1720-
(set-window-start win (point-min)))))
1713+
(ghostel--redraw ghostel--term ghostel-full-redraw)))))))
17211714

17221715
(defun ghostel-force-redraw ()
17231716
"Force a full terminal redraw (for debugging)."
17241717
(interactive)
17251718
(when ghostel--term
17261719
(let ((inhibit-read-only t))
1727-
(ghostel--redraw ghostel--term ghostel-full-redraw)
1728-
(ghostel--pin-window-start))))
1720+
(ghostel--redraw ghostel--term ghostel-full-redraw))))
17291721

17301722

17311723
;;; Window resize
@@ -1772,8 +1764,7 @@ PROCESS is the shell, HEIGHT and WIDTH the final dimensions."
17721764
(let ((inhibit-read-only t)
17731765
(inhibit-redisplay t)
17741766
(inhibit-modification-hooks t))
1775-
(ghostel--redraw ghostel--term ghostel-full-redraw)
1776-
(ghostel--pin-window-start))))))
1767+
(ghostel--redraw ghostel--term ghostel-full-redraw))))))
17771768

17781769

17791770

0 commit comments

Comments
 (0)