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

ValueError if searching for undo history which has a null character ^@ #80

Open
ruohola opened this issue Mar 7, 2019 · 0 comments
Open
Labels

Comments

@ruohola
Copy link

ruohola commented Mar 7, 2019

The error occurs when you're trying to search (with /) a place in the undo history which also happens to have a ^@ aka null character in one of the changed lines. The place of the null character on the line is irrelevant, it just has to be somewhere in a + or - line.

The error is easy to reproduce:

  • Start editing a new file
  • Type the line (use CTRL-V CTRL-J, for typing the ^@): test^@
  • Exit insert mode so the changes are in different undos:
  • Make a 2nd line with the text: otherline
  • Open Mundo and /test
  • This error happens:
Error detected while processing function <SNR>54_MundoPython:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/eero/.dotfiles/vim/plugged/vim-mundo/autoload/mundo.py", line 306, in MundoSearch
    MundoNextMatch()
  File "/Users/eero/.dotfiles/vim/plugged/vim-mundo/autoload/mundo.py", line 314, in MundoNextMatch
    MundoMatch(1)
  File "/Users/eero/.dotfiles/vim/plugged/vim-mundo/autoload/mundo.py", line 344, in MundoMatch
    match_index = vim.eval('match("%s",@/)'% change.replace("\\","\\\\").replace('"','\\"'))
ValueError: embedded null byte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants