mergeconflicts

package
v0.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColoredConflictFile

func ColoredConflictFile(content string, state *State, hasFocus bool) string

Types

type LineType added in v0.28.2

type LineType int

LineType tells us whether a given line is a start/middle/end marker of a conflict, or if it's not a marker at all

const (
	START LineType = iota
	ANCESTOR
	TARGET
	END
	NOT_A_MARKER
)

type Selection

type Selection int
const (
	TOP Selection = iota
	MIDDLE
	BOTTOM
	ALL
)

type State added in v0.28.1

type State struct {
	sync.Mutex

	// this allows us to undo actions
	EditHistory *stack.Stack
	// contains filtered or unexported fields
}

func NewState added in v0.28.1

func NewState() *State

func (*State) ContentAfterConflictResolve added in v0.28.1

func (s *State) ContentAfterConflictResolve(
	path string,
	selection Selection,
) (bool, string, error)

func (*State) GetConflictMiddle added in v0.28.1

func (s *State) GetConflictMiddle() int

func (*State) IsFinalConflict added in v0.28.1

func (s *State) IsFinalConflict() bool

func (*State) NoConflicts added in v0.28.1

func (s *State) NoConflicts() bool

func (*State) PopFileSnapshot added in v0.28.1

func (s *State) PopFileSnapshot() (string, bool)

func (*State) PushFileSnapshot added in v0.28.1

func (s *State) PushFileSnapshot(content string)

func (*State) Reset added in v0.28.1

func (s *State) Reset()

func (*State) SelectNextConflict added in v0.28.1

func (s *State) SelectNextConflict()

func (*State) SelectNextConflictHunk added in v0.30.1

func (s *State) SelectNextConflictHunk()

func (*State) SelectPrevConflict added in v0.28.1

func (s *State) SelectPrevConflict()

func (*State) SelectPrevConflictHunk added in v0.30.1

func (s *State) SelectPrevConflictHunk()

func (*State) Selection added in v0.28.1

func (s *State) Selection() Selection

func (*State) SetConflictsFromCat added in v0.28.1

func (s *State) SetConflictsFromCat(cat string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL