-
Notifications
You must be signed in to change notification settings - Fork 124
Fix double undo #100
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
Open
Kypert
wants to merge
4
commits into
rhysd:master
Choose a base branch
from
Kypert:fix/issues/98
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix double undo #100
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
kana/vim-operator-user (0.1.0) | ||
kana/vim-vspec (1.6.1) | ||
kana/vim-vspec (1.9.0) | ||
rhysd/vim-vspec-matchers (0.0.4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,7 @@ describe 'default settings' | |
Expect exists('g:clang_format#filetype_style_options') to_be_true | ||
Expect exists('g:clang_format#command') to_be_true | ||
Expect exists('g:clang_format#detect_style_file') to_be_true | ||
Expect exists('g:clang_format#praise') to_be_true | ||
Expect exists('g:clang_format#auto_format') to_be_true | ||
Expect exists('g:clang_format#auto_format_on_insert_leave') to_be_true | ||
Expect g:clang_format#extra_args to_be_empty | ||
|
@@ -107,6 +108,7 @@ describe 'default settings' | |
Expect g:clang_format#filetype_style_options to_be_empty | ||
Expect executable(g:clang_format#command) to_be_true | ||
Expect g:clang_format#detect_style_file to_be_true | ||
Expect g:clang_format#praise to_be_true | ||
end | ||
|
||
it 'provide commands' | ||
|
@@ -457,9 +459,28 @@ describe 'undo formatting text' | |
bdelete! | ||
end | ||
|
||
it 'can make a change, format (constitutes as a second change), then undo and keep the first change' | ||
normal! ggOmega | ||
ClangFormat | ||
" When running :ClangFormat from a normal vim instance, setline() does add an entry in the undolist | ||
" For some reason it does not do so when running in this test framework | ||
" Also, seems like it is hard to even add another item to the change list too, always rendering: | ||
" # number changes when saved | ||
" # 9 1 0 seconds ago | ||
Comment on lines
+465
to
+469
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be happy if someone could enlighten me regarding this comment. |
||
normal! ggOadditional | ||
:Debug GetBuffer() | ||
" TODO: should enable this | ||
" normal! u | ||
Expect 0 != search('mega', 'cw') | ||
undo | ||
Expect 0 == search('mega', 'cw') | ||
end | ||
|
||
it 'restores previous text as editing buffer normally' | ||
let prev = GetBuffer() | ||
ClangFormat | ||
let buf = GetBuffer() | ||
Expect prev != buf | ||
undo | ||
let buf = GetBuffer() | ||
Expect prev ==# buf | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.