mergeconflicts

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT Imports: 7 Imported by: 0

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
	MIDDLE
	END
	NOT_A_MARKER
)

type Selection

type Selection int
const (
	TOP Selection = iota
	BOTTOM
	BOTH
)

type State added in v0.28.1

type State struct {
	sync.Mutex

	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) SelectBottomOption added in v0.28.1

func (s *State) SelectBottomOption()

func (*State) SelectNextConflict added in v0.28.1

func (s *State) SelectNextConflict()

func (*State) SelectPrevConflict added in v0.28.1

func (s *State) SelectPrevConflict()

func (*State) SelectTopOption added in v0.28.1

func (s *State) SelectTopOption()

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