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

fix: fzf toc display and jump error when spaces in file path #1996

Merged
merged 1 commit into from Mar 21, 2021

Conversation

WeixuanZ
Copy link
Contributor

The file path and heading extracted by splitting at spaces would be wrong if the path contains spaces itself. Using \u2007 as a hack to preserve formatting (junegunn/fzf#585)

@lervag
Copy link
Owner

lervag commented Mar 21, 2021

The file path and heading extracted by splitting at spaces would be wrong if the path contains spaces itself. Using \u2007 as a hack to preserve formatting

Seems like a simple and useful hack. Thanks!

Do you have or can you show a simple test case for this?

@lervag
Copy link
Owner

lervag commented Mar 21, 2021

That is: Can you show a simple/minimal example that currently fails that this PR will fix?

@WeixuanZ
Copy link
Contributor Author

WeixuanZ commented Mar 21, 2021

Sure, this is when tests/test-toc/main.tex is renamed to test main.tex (i.e. including a space) and using the current code:

old

Selecting main.tex Preamble, would open tests/test-toc/test as a new file.

With this PR:

new

@lervag
Copy link
Owner

lervag commented Mar 21, 2021

Thanks!

@lervag lervag merged commit 61d5455 into lervag:master Mar 21, 2021
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

2 participants