-
Notifications
You must be signed in to change notification settings - Fork 12
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
Does not seem to work on MacOS #12
Comments
idbrii
added a commit
to idbrii/vim-mergetool
that referenced
this issue
Apr 16, 2020
Fix samoshkin#12: We were assuming users had 'hidden' set. mergetool#start ends with two steps: prefer_revision and set_layout. prefer_revision modifies the current buffer to remove conflict markers. set_layout closes all but the first window in g:mergetool_layout and then shows the other windows in order. If a user has these combination of settings, closing the merge buffer's window will trigger an error: set nohidden let g:mergetool_layout = 'rm' We modify the merge buffer (without saving it -- so the user knows we made changes) and then we try to close it (because 'm' is not the first item in mergetool_layout), which triggers an "unsaved changes" error. Prevent the error by temporarily marking the merge buffer to hide while we're modifying the layout. Uses setbufvar (introduced to vim in 7.0) to clean up so if the user doesn't include 'm' in the layout, we don't fail to clean up. And in that case, the merge buffer is already hidden, so it doesn't cause unsaved errors until it's shown again.
I saw the same problem on windows where when invoked as git mergetool you get that error. I believe it's because the code assumes you're using |
idbrii
added a commit
to idbrii/vim-mergetool
that referenced
this issue
Apr 16, 2020
Fix samoshkin#12: We were assuming users had 'hidden' set. mergetool#start ends with two steps: prefer_revision and set_layout. prefer_revision modifies the current buffer to remove conflict markers. set_layout closes all but the first window in g:mergetool_layout and then shows the other windows in order. If a user has these combination of settings, closing the merge buffer's window will trigger an error: set nohidden let g:mergetool_layout = 'rm' We modify the merge buffer (without saving it -- so the user knows we made changes) and then we try to close it (because 'm' is not the first item in mergetool_layout), which triggers an "unsaved changes" error. Prevent the error by temporarily marking the merge buffer to hide while we're modifying the layout. Uses setbufvar (introduced to vim in 7.0) to clean up so if the user doesn't include 'm' in the layout, we don't fail to clean up. And in that case, the merge buffer is already hidden, so it doesn't cause unsaved errors until it's shown again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MacOS: 10.14.6
vim 8.1
error:
The text was updated successfully, but these errors were encountered: