| 1 | package Vim::X::Plugin::ResolveConflict; | ||||||||||||||||||||||
| 2 | BEGIN { | ||||||||||||||||||||||
| 3 | 1 | ▶ | $Vim::X::Plugin::ResolveConflict::AUTHORITY = 'cpan:YANICK'; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 4 | } | ||||||||||||||||||||||
| 5 | 1 | $Vim::X::Plugin::ResolveConflict::VERSION = '1.0.1'; | |||||||||||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 7 | 1 | ▶ | use warnings; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 8 | |||||||||||||||||||||||
| 9 | 1 | ▶ | use Vim::X; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 10 | |||||||||||||||||||||||
| 11 | sub ResolveConflict :Vim(args) { | ||||||||||||||||||||||
| 12 | 0 | ▶ | my $side = shift; | ||||||||||||||||||||
|
Subroutine
ResolveConflict: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||
| 13 | |||||||||||||||||||||||
| 14 | 0 | my $here = vim_cursor; | |||||||||||||||||||||
| 15 | 0 | my $mine = $here->clone->rewind(qr/^<{7}/); | |||||||||||||||||||||
| 16 | 0 | my $midway = $mine->clone->ff( qr/^={7}/ ); | |||||||||||||||||||||
| 17 | 0 | my $theirs = $midway->clone->ff( qr/^>{7}/ ); | |||||||||||||||||||||
| 18 | |||||||||||||||||||||||
| 19 | 0 | ▶ | $here = $side eq 'here' ? $here | ||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||
| 20 | : $side eq 'mine' ? $mine | ||||||||||||||||||||||
| 21 | : $side eq 'theirs' ? $theirs | ||||||||||||||||||||||
| 22 | : $side eq 'both' ? $midway | ||||||||||||||||||||||
| 23 | : die "side '$side' is invalid" | ||||||||||||||||||||||
| 24 | ; | ||||||||||||||||||||||
| 25 | |||||||||||||||||||||||
| 26 | 0 | vim_delete( | |||||||||||||||||||||
| 27 | # delete the marker | ||||||||||||||||||||||
| 28 | $mine, $midway, $theirs, | ||||||||||||||||||||||
| 29 | # and whichever side we're not on | ||||||||||||||||||||||
| 30 | ( $midway..$theirs ) x ($here < $midway), | ||||||||||||||||||||||
| 31 | ( $mine..$midway ) x ($here > $midway), | ||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||
| 33 | |||||||||||||||||||||||
| 34 | 1 | ▶ | }; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 35 | |||||||||||||||||||||||
| 36 | 1 | 1; | |||||||||||||||||||||
| 37 | |||||||||||||||||||||||
| 38 | __END__ | ||||||||||||||||||||||
| 39 | |||||||||||||||||||||||
| 40 | =pod | ||||||||||||||||||||||
| 41 | |||||||||||||||||||||||
| 42 | =encoding UTF-8 | ||||||||||||||||||||||
| 43 | |||||||||||||||||||||||
| 44 | =head1 NAME | ||||||||||||||||||||||
| 45 | |||||||||||||||||||||||
| 46 | Vim::X::Plugin::ResolveConflict | ||||||||||||||||||||||
| 47 | |||||||||||||||||||||||
| 48 | =head1 VERSION | ||||||||||||||||||||||
| 49 | |||||||||||||||||||||||
| 50 | version 1.0.1 | ||||||||||||||||||||||
| 51 | |||||||||||||||||||||||
| 52 | =head1 AUTHOR | ||||||||||||||||||||||
| 53 | |||||||||||||||||||||||
| 54 | Yanick Champoux <yanick@cpan.org> | ||||||||||||||||||||||
| 55 | |||||||||||||||||||||||
| 56 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||
| 57 | |||||||||||||||||||||||
| 58 | This software is copyright (c) 2014 by Yanick Champoux. | ||||||||||||||||||||||
| 59 | |||||||||||||||||||||||
| 60 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||
| 61 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||
| 62 | |||||||||||||||||||||||
| 63 | =cut | ||||||||||||||||||||||