Skip to content

Loading…

Plugin breaks undo #16

Closed
TobiasBerg opened this Issue · 5 comments

4 participants

@TobiasBerg

After installing GitGutter I've noticed that the undo feature breaks normal behavior.

If I write some text and try to undo it, instead of removing the whole text it removes one letter at a time.

To reproduce:
Write some text
Hit undo.
Notice behavior.
Install GitGutter
Write some text
Hit undo.
Notice the different behavior

This was tested on a Mac.

@samueljohn

I think, I observed this, too but I didn't recognize. Good catch.

@jisaacks
Owner

This is happening because an event listener is being fired on every modification. Not sure if there is anything that can be done about that, and it actually sounds like a possible sublime bug.

If you don't like it, you can turn off Git Gutter's live mode in your Package.sublime-settings file:

"git_gutter_live_mode": false

Your undo will work normal again.

@kfuglsang

Even when disabling live mode, the undo behavior is affected. I noticed that the chunks that are being undone are much larger when GitGutter is installed.

Without GitGutter installed, Sublime undoes one word at a time.

I'm on Windows 8 x64 btw.

@frantic frantic added a commit to frantic/GitGutter that referenced this issue
@frantic frantic Fixed Sublime's undo when GitGutter is active
Seams like the problem was in `run_command` which creates new edit,
thus making every char input separate. In that case every Undo
reverted symbol-by-symbol changes.

This commit separates GitGutter logic from Sublime's TextCommand, so
it can be directly invoked on view

Related issue: #16
2ea3712
@jisaacks
Owner

This is fixed with #22

@jisaacks jisaacks closed this
@samueljohn

Confirmed. Fixed. Thanks!

@dichlofos dichlofos referenced this issue in dichlofos/VcsGutter
@dichlofos dichlofos First attempt to fix issue #16 (Unversioned files)
Implemented for git only.
5e7bcbc
@dichlofos dichlofos referenced this issue in dichlofos/VcsGutter
@dichlofos dichlofos First attempt to fix #16 (Show not tracked files)
For git only.
e40abd8
@dichlofos dichlofos referenced this issue in dichlofos/VcsGutter
@dichlofos dichlofos Issue #16: Added hg support 4851d1a
@dichlofos dichlofos referenced this issue in dichlofos/VcsGutter
@dichlofos dichlofos SVN support for #16. f758013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.