Skip to content

WIP: Make visible cursor in search field move with index (fix #92) - #93

Open
lukeflo wants to merge 1 commit into
orhun:mainfrom
lukeflo:main
Open

WIP: Make visible cursor in search field move with index (fix #92)#93
lukeflo wants to merge 1 commit into
orhun:mainfrom
lukeflo:main

Conversation

@lukeflo

@lukeflo lukeflo commented Oct 25, 2024

Copy link
Copy Markdown

Description of change

I made the visible cursor move with the index of the current search pattern using the visual_cursor() and visual_scroll method of the tui_input crate. It works now, but the cursor still hides the underlaying character. Maybe the order of the inner render functions for each tab has to be changed (at least that worked in my own tui app). But your rendering code is quite complex and I hadn't the time to skim through all details.

Though, I still hope this WIP PR helps with the issue.

@codecov

codecov Bot commented Oct 26, 2024

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.32%. Comparing base (c6e20e5) to head (bac80a6).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
src/tui/ui.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main     #93      +/-   ##
========================================
+ Coverage   3.31%   3.32%   +0.01%     
========================================
  Files         19      19              
  Lines       2417    2414       -3     
========================================
  Hits          80      80              
+ Misses      2337    2334       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@orhun

orhun commented Oct 26, 2024

Copy link
Copy Markdown
Owner

Thanks for the PR! It looks good to me.

It works now, but the cursor still hides the underlaying character.

Yeah, I took a quick look and couldn't figure out what's wrong. FWIW, I did a similar implementation in systeroid-tui and it was working fine.

Maybe the order of the inner render functions for each tab has to be changed (at least that worked in my own tui app).

I'm not sure how that's related, can you explain a bit more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants