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

Return document display name from the % special register #11275

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

the-mikedavis
Copy link
Member

This matches Kakoune's behavior. Its '%' special register returns the current buffer's "display path" which is the same as our Document::display_name: a relative path, or a path with a tilde (if the path is under the home dir) or an absolute path otherwise, and SCRATCH_BUFFER_NAME if the doc has no path.

This matches Kakoune's behavior. Its '%' special register returns the
current buffer's "display path" which is the same as our
`Document::display_name`: a relative path, or a path with a tilde (if
the path is under the home dir) or an absolute path otherwise, and
`SCRATCH_BUFFER_NAME` if the doc has no path.
Copy link
Member

@pascalkuthe pascalkuthe left a comment

Choose a reason for hiding this comment

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

This has been something that has been bugging me for quite a while. This makes the special register much more useful

@archseer archseer merged commit 86795a9 into master Jul 22, 2024
6 checks passed
@archseer archseer deleted the relative-document-path-register branch July 22, 2024 21:56
SofusA pushed a commit to SofusA/helix-pull-diagnostics that referenced this pull request Aug 4, 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.

None yet

3 participants