[GH-ISSUE #175] after upgrade cursor in search bar not aligned vertically correctly #90

Closed
opened 2026-02-28 14:46:57 +03:00 by kerem · 5 comments
Owner

Originally created by @stevensonmt on GitHub (Nov 30, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/175

Updated to latest release with cargo. After update the cursor in the search box is vertically centered on the bottom of the search box border while text appears centered vertically in the search box. See screenshot:
image

Originally created by @stevensonmt on GitHub (Nov 30, 2019). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/175 Updated to latest release with cargo. After update the cursor in the search box is vertically centered on the bottom of the search box border while text appears centered vertically in the search box. See screenshot: ![image](https://user-images.githubusercontent.com/8891908/69906347-fffc1280-1376-11ea-93cc-b0a3962ade16.png)
kerem closed this issue 2026-02-28 14:46:57 +03:00
Author
Owner

@Rigellute commented on GitHub (Dec 2, 2019):

Hmm... strange. Looks okay to me.
image

Not yet sure which commit might have messed with cursor position in your case.

<!-- gh-comment-id:560312401 --> @Rigellute commented on GitHub (Dec 2, 2019): Hmm... strange. Looks okay to me. <img width="843" alt="image" src="https://user-images.githubusercontent.com/12150276/69947962-a74b8780-14e6-11ea-854c-05ad7d394f87.png"> Not yet sure which commit might have messed with cursor position in your case.
Author
Owner

@ghost commented on GitHub (Dec 2, 2019):

I'm not sure what caused this behavior but it seems to occur depending on terminal size.

51 lines in the window:
spt_01

43 lines in the window:
spt_02

<!-- gh-comment-id:560335582 --> @ghost commented on GitHub (Dec 2, 2019): I'm not sure what caused this behavior but it seems to occur depending on terminal size. 51 lines in the window: ![spt_01](https://user-images.githubusercontent.com/54503126/69951921-87917f00-1539-11ea-8635-7a3e9d50599c.png) 43 lines in the window: ![spt_02](https://user-images.githubusercontent.com/54503126/69951932-8bbd9c80-1539-11ea-83b1-d23f4c47ea14.png)
Author
Owner

@ghost commented on GitHub (Dec 2, 2019):

I found that the margin of main layout is set to 1 or 0 depending on terminal height (line 142 in src/ui/mod.rs) and this seems to cause the problem. To fix it, fix margin size to 0 or 1 regardless of terminal height or change cursor position when terminal height is lower than 45. If anyone does not fix it, I will do.

<!-- gh-comment-id:560361652 --> @ghost commented on GitHub (Dec 2, 2019): I found that the margin of main layout is set to 1 or 0 depending on terminal height (line 142 in `src/ui/mod.rs`) and this seems to cause the problem. To fix it, fix margin size to 0 or 1 regardless of terminal height or change cursor position when terminal height is lower than 45. If anyone does not fix it, I will do.
Author
Owner

@stevensonmt commented on GitHub (Dec 2, 2019):

Can confirm that larger terminal height fixes the cursor alignment. As for which commit, I don't know but I've got version 0.10.0 - 2019-11-30 showing up on the initial screen.

<!-- gh-comment-id:560451240 --> @stevensonmt commented on GitHub (Dec 2, 2019): Can confirm that larger terminal height fixes the cursor alignment. As for which commit, I don't know but I've got version 0.10.0 - 2019-11-30 showing up on the initial screen.
Author
Owner

@Rigellute commented on GitHub (Dec 2, 2019):

@echoSayonara ah yes of course!! I will PR a fix a bit later today

<!-- gh-comment-id:560467331 --> @Rigellute commented on GitHub (Dec 2, 2019): @echoSayonara ah yes of course!! I will PR a fix a bit later today
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#90
No description provided.