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

Implement horizontal scrolling #65

Merged
merged 6 commits into from
Feb 15, 2024
Merged

Implement horizontal scrolling #65

merged 6 commits into from
Feb 15, 2024

Conversation

AMythicDev
Copy link
Owner

@AMythicDev AMythicDev commented Mar 23, 2022

This PR introduces horizontal scrolling into minus.

Roadmap

  • Introduce new public function to control line wrapping in Pager struct and Event variant related to it
  • New key bindings for moving left and right and new variant of UserInput to get events of horizontal scroll keys.
  • Format text for wrapping only when line_wrapping is true in formatted_line function.

The entire roadmap is currently unclear, but I will make sure to update stuff where as we get closer to a working implementation.

Closes #59

@AMythicDev AMythicDev added E-feature Feature request S: horizontal Horizontal scrolling labels Mar 23, 2022
@AMythicDev AMythicDev self-assigned this Mar 23, 2022
@AMythicDev AMythicDev mentioned this pull request Mar 23, 2022
@AMythicDev AMythicDev force-pushed the main branch 2 times, most recently from 7f35576 to b3de651 Compare March 22, 2023 07:30
@AMythicDev AMythicDev force-pushed the main branch 2 times, most recently from 42d70f5 to 8d8a78b Compare September 13, 2023 09:02
@AMythicDev AMythicDev force-pushed the horizontal-scroll branch 2 times, most recently from a0cc54f to 398bacc Compare February 12, 2024 15:27
@AMythicDev AMythicDev marked this pull request as ready for review February 12, 2024 15:43
@AMythicDev AMythicDev mentioned this pull request Feb 13, 2024
This patch introduces the new LineWrapping event to control horizontal
scroll and Pager::set_line_wrapping function which will fire this event
when the main application calls this function.

It also introduces the left_mark variable similar to the upper_mark
variable but to keep track of horizontal scroll
* Add `h` and `Left` for scrolling to left
* Add `l` and `Right` for scrolling to right

Introduce UpdateLeftMark UnerInput event to be fired when the above keys
are pressed
@AMythicDev AMythicDev merged commit b034c3b into main Feb 15, 2024
6 checks passed
@AMythicDev AMythicDev deleted the horizontal-scroll branch February 15, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-feature Feature request S: horizontal Horizontal scrolling
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Horizontal scrolling
1 participant