Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Former Bug: Taking conflicts with hunk at end of file Edit
When a conflict in a file extends to the very end of the file (i.e. the last line is part of the conflicting hunk), I can't use the keys to take a specific hunk and delete the rest. Attempting to do so throws an error:
Error detected while processing function ConflictMotions#Take..ConflictMotions#TakeFromConflict..ingo#lines#PutWrapper: line 30: E16: Invalid range: 2put! =a:lines
Oddly, this doesn't occur if the conflict spans the whole file. But as long as it starts on at least line 2 or later, and goes to the end, any attempt to take a particular hunk fails (and deletes the entire conflict). Deleting the entire conflict with <Leader>xd still works fine.
Here's a sample file:
Some text above the conflict. Bug doesn't happen if it covers the whole file. <<<<<<< HEAD Some text here for HEAD ||||||| ANCESTOR Some text here for ANCESTOR ======= OLD Some text here for OLD. There must not be a line after the close marker. >>>>>>>
This was reproduced with version 2.00.
This can be fixed by editing autoload/ConflictMotions.vim line 281 and changing
call ingo#lines#PutWrapper(a:startLnum, 'put!', l:sections)
call ingo#lines#PutBefore(a:startLnum, l:sections)
Former Bug: Taking conflicts where hunk spans entire file adds blank line Edit
When the conflict spans the entire file, taking a hunk leaves an extra blank line at the end.
The reproduction is similar to above, but without that first line:
2Some text here for HEAD
4Some text here for ANCESTOR
6Some text here for OLD. There must not be a line after the close marker.
Taking any hunk will work, but it will leave a blank line afterwards:
1Some text here for HEAD
Former Bug: Taking an empty hunk beeps Edit
When a hunk is empty, trying to take it beeps. This apparently is caused by executing the command
normal yi=. Which is to say, the inner section mapping beeps if there's no content. That seems reasonable, but I would not expect
:ConflictTake this to beep when the section is empty, as it is actually doing work (it's deleting the other sections).
Unfortunately, it appears the beep is produced by CountJump and there is no way to suppress it. I believe the only solution is to temporarily
:set vb t_vb=.
- Thanks for reporting those. You're lucky that I saw them here; I don't get automatically notified of comments to my plugins here. In the future, please just send an email to the address found in the plugin help. I've addressed all three bugs in version 2.01. -- Inkarkat (talk) 19:08, May 31, 2014 (UTC)
- I put a note at Vim Tips Wiki:Script comment guidelines#Script authors showing how you can be notified whenever this page is edited, if you want. That link is available at "(see the guideline)" near the top of this page. JohnBeckett (talk) 05:15, June 2, 2014 (UTC)