From bfc4b1d1959914263e9c4488ec5022cc678d8235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Wed, 13 Mar 2024 20:58:44 +0100 Subject: [PATCH] termwindow: Show cursor only when his X and Y axis is smaller than the window (#3036) --- internal/display/termwindow.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/display/termwindow.go b/internal/display/termwindow.go index 6c30fa7f..e5d80494 100644 --- a/internal/display/termwindow.go +++ b/internal/display/termwindow.go @@ -110,6 +110,8 @@ func (w *TermWindow) Display() { } if w.State.CursorVisible() && w.active { curx, cury := w.State.Cursor() - screen.ShowCursor(curx+w.X, cury+w.Y) + if curx < w.Width && cury < w.Height { + screen.ShowCursor(curx+w.X, cury+w.Y) + } } }