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

Mysterious string makes regex behavior dependent on cursor position #1064

Open
ldwgchen opened this issue Jan 2, 2023 · 3 comments
Open

Comments

@ldwgchen
Copy link

ldwgchen commented Jan 2, 2023

Said string is present in the second line of every PDF file. I believe its use is to declare the version of PDF format.

Say we use vis to edit a file like this:

himom
MYSTERIOUS_STRING
hidad
hidad

If I place the cursor before the string, /hidad won't move my cursor as expected. If I place the cursor after the string, however, searching by / works normally.

Also, :x/hidad/c/hiaunt/ won't work no matter where I position my cursor.

@mcepl
Copy link
Contributor

mcepl commented Jan 7, 2023

vis doesn’t touch files much, but I am really not sure whether it supports editing of binary (non-text) files.

@rnpnr
Copy link
Collaborator

rnpnr commented Oct 10, 2023

I think we will a minimal example file that demonstrates this behaviour. Otherwise it will be difficult to debug.

@ldwgchen
Copy link
Author

I think we will a minimal example file that demonstrates this behaviour. Otherwise it will be difficult to debug.

Here is an example.
example.txt

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

No branches or pull requests

4 participants
@mcepl @rnpnr @ldwgchen and others