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

Easymotion breaks my undo history #290

Closed
eliasnystrom opened this issue May 9, 2016 · 4 comments
Closed

Easymotion breaks my undo history #290

eliasnystrom opened this issue May 9, 2016 · 4 comments

Comments

@eliasnystrom
Copy link

For some time I've had the problem that my undohistory breaks spontaneously, seemingly at random. Just now I found that the reason for this is that the undolevel is set to -1. EasyMotion is the only one of my currently installed plugins that touches this setting (and it sets it to -1).

Why does EasyMotion do this? So far I haven't been able to detect any particular pattern behind the occurrences. From the code it seems to be part of some fail handling.

@haya14busa
Copy link
Member

Hmm.... today, I also had the problem, I cannot reproduce it though. I'll look into it.

@damage220
Copy link

I have the same issue:

  1. Open a file.
  2. Search through easymotion.
  3. Type "u" for a few times.
    Tab has changed its color and I can't leave the editor - "No write since last change for buffer".

@haya14busa
Copy link
Member

I didn't experience this problem thesedays, and I cannot reproduce this.
Please reopen if you find reproducible way.

@dimhatz
Copy link

dimhatz commented Jul 8, 2017

I also experience this issue. GVim on Windows 10, both 64bit. Precompiled version from https://tuxproject.de/projects/vim/

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 22 2017 20:05:01)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-655
Compiled by hp@HP-PC
Huge version with GUI. 

Also tested 64-bit version v8.0.0698 from https://github.com/vim/vim-win32-installer/releases.
Bug still occurs. Haven't tested other platforms.

Here is how to reproduce.
Install the plugin and put this in _vimrc:

set nocompatible               " Be iMproved
set laststatus=2    " Always show status bar
map <Leader> <Plug>(easymotion-prefix)

Now open any file that has some text in it
:e ~/_vimrc
Press <Leader>j to highlight the beginning of each line.
Press <Esc> to cancel the motion (or any key to perform motion - does not matter)
Press u to undo.

Expected behavior: nothing happens to the buffer, since we did not change any text.

Actual behavior: u shows the buffer in a changed state (as if some change was performed). The statusline on the bottom shows [+] as if there was a modification to the buffer. This causes confusion when using undo, I'm not sure if it also corrupts the undo history.

P.S. using the original prefix mapping <Leader><Leader> still causes the bug to appear.
P.P.S. opened as new issue here: #339

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

No branches or pull requests

4 participants