WIP: Make visible cursor in search field move with index (fix #92)
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 Report
Attention: 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 3 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/tui/ui.rs | 0.00% | 2 Missing :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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?