Skip to content

refactor: generalize input field logic for easier reuse#2035

Merged
ClementTsang merged 17 commits into
mainfrom
generalize_search_and_cursor
Apr 13, 2026
Merged

refactor: generalize input field logic for easier reuse#2035
ClementTsang merged 17 commits into
mainfrom
generalize_search_and_cursor

Conversation

@ClementTsang
Copy link
Copy Markdown
Owner

@ClementTsang ClementTsang commented Apr 12, 2026

Description

A description of the change, what it does, and why it was made. If relevant (e.g. UI changes), please also provide screenshots/recordings:

This came up while I was reviewing/updating #1953 - we probably want to generalize the really hairy input field logic so it can be reused anywhere. This PR further generalizes it so it's not as tied into app state logic. It also fixes a found bug around deleting whole words if they were were more than one byte long.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested (including steps):

If this change affects the program, please also indicate which platforms were tested:

  • Windows
  • macOS (specify version below)
  • Linux (specify distro below)
  • Other (specify below)

Checklist

Ensure all of these are met:

  • If this PR adds or changes a dependency, please justify this in the description
  • If this is a code change, areas your change affects have been linted using (cargo fmt)
  • If this is a code change, your changes pass cargo clippy --all -- -D warnings
  • If this is a code change, new tests were added if relevant
  • If this is a code change, your changes pass cargo test
  • The change has been tested to work (see above) and doesn't appear to break other things
  • Documentation has been updated if needed (README.md, help menu, docs, configs, etc.)
  • There are no merge conflicts
  • You have reviewed your changes first
  • The pull request passes the provided CI pipeline

Other

Anything else that maintainers should know about this PR:

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 12, 2026

Codecov Report

❌ Patch coverage is 85.93750% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.35%. Comparing base (3545a31) to head (fdcc179).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/input.rs 93.02% 36 Missing ⚠️
src/app.rs 0.00% 34 Missing ⚠️
src/canvas/widgets/process_table.rs 0.00% 6 Missing ⚠️
src/widgets/process_table.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2035      +/-   ##
==========================================
+ Coverage   54.04%   55.35%   +1.31%     
==========================================
  Files         122      123       +1     
  Lines       17049    17278     +229     
==========================================
+ Hits         9214     9565     +351     
+ Misses       7835     7713     -122     
Flag Coverage Δ
macos-14 48.43% <85.76%> (+1.58%) ⬆️
ubuntu-24.04 53.89% <85.93%> (+1.40%) ⬆️
windows-2022 48.06% <85.76%> (+1.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@ClementTsang ClementTsang force-pushed the generalize_search_and_cursor branch from 5bfdc25 to 9cb9a0d Compare April 12, 2026 21:32
@ClementTsang ClementTsang merged commit d187559 into main Apr 13, 2026
38 checks passed
@ClementTsang ClementTsang deleted the generalize_search_and_cursor branch April 13, 2026 05:24
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.

1 participant