Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Improve visual_offset_from_block performance on long lines #9868

Open
trink opened this issue Mar 13, 2024 · 2 comments
Open
Labels

Comments

@trink
Copy link
Contributor

trink commented Mar 13, 2024

Steps to Reproduce

  1. :open helix-term/src/commands.rs
  2. % # select_all
  3. <Alt-J> # join_selections_space
  4. j # move_visual_line_down

Result

This hangs the UI for 30 seconds on my machine. Tracked it down to visual_offset_from_block with the following documentation:

/// Text is always wrapped at blocks, they usually correspond to
/// actual line breaks but for very long lines
/// softwrapping positions are estimated with an O(1) algorithm
/// to ensure consistent performance for large lines (currently unimplemented)
@pascalkuthe
Copy link
Member

Do you have softwrap enabled? Otherwise that improvement won't do anything altough we may consider forcong softwrap for very long lines

@trink
Copy link
Contributor Author

trink commented Mar 22, 2024

@pascalkuthe yes softwrap was enabled in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants