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

Add a CloseWithoutClear copy mode key assignment #4924

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

LeszekSwirski
Copy link
Contributor

Closing the copy overlay currently unconditionally clears the viewport,
in particular resetting scroll. For the search overlay, we don't
necessarily want to scroll back to the prompt after finding a match --
indeed, the old search overlay (which didn't use copy mode) had this
behaviour.

Add a CloseWithoutClear key assignment which has this desired behaviour,
and make it the default for ESC in search mode.

Closing the copy overlay currently unconditionally clears the viewport,
in particular resetting scroll. For the search overlay, we don't
necessarily want to scroll back to the prompt after finding a match --
indeed, the old search overlay (which didn't use copy mode) had this
behaviour.

Add a CloseWithoutClear key assignment which has this desired behaviour,
and make it the default for ESC in search mode.
@LeszekSwirski
Copy link
Contributor Author

This fixes #3502

Copy link
Owner

@wez wez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for diving in!

config/src/keyassignment.rs Outdated Show resolved Hide resolved
config/src/keyassignment.rs Outdated Show resolved Hide resolved
wezterm-gui/src/overlay/copy.rs Outdated Show resolved Hide resolved
@LeszekSwirski
Copy link
Contributor Author

Added a helper and dropped ResetViewport, PTAL (and let me know if you prefer me to squash the individual commits)

LeszekSwirski

This comment was marked as outdated.

@LeszekSwirski
Copy link
Contributor Author

Ping

@LeszekSwirski
Copy link
Contributor Author

LeszekSwirski commented Feb 27, 2024

Ping again (@wez)

@LeszekSwirski
Copy link
Contributor Author

@wez anything more to do here?

@LeszekSwirski LeszekSwirski requested a review from wez June 3, 2024 11:56
@LeszekSwirski
Copy link
Contributor Author

Regular ping for review, @wez

@wez wez merged commit fef52df into wez:main Jul 22, 2024
15 of 16 checks passed
@wez
Copy link
Owner

wez commented Jul 22, 2024

Thank you!

wez added a commit that referenced this pull request Jul 22, 2024
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