Documentation
¶
Index ¶
- Variables
- func ColoredConflictFile(state *State) string
- func FileHasConflictMarkers(path string) (bool, error)
- type LineType
- type Selection
- type State
- func (s *State) Active() bool
- func (s *State) AllConflictsResolved() bool
- func (s *State) ContentAfterConflictResolve(selection Selection) (bool, string, error)
- func (s *State) GetConflictMiddle() int
- func (s *State) GetContent() string
- func (s *State) GetPath() string
- func (s *State) GetSelectedLine() int
- func (s *State) GetSelectedRange() (int, int)
- func (s *State) NoConflicts() bool
- func (s *State) PlainRenderSelected() string
- func (s *State) PushContent(content string)
- func (s *State) Reset()
- func (s *State) ResetConflictSelection()
- func (s *State) SelectNextConflict()
- func (s *State) SelectNextConflictHunk()
- func (s *State) SelectPrevConflict()
- func (s *State) SelectPrevConflictHunk()
- func (s *State) Selection() Selection
- func (s *State) SetContent(content string, path string)
- func (s *State) Undo() bool
Constants ¶
This section is empty.
Variables ¶
var ( CONFLICT_START = "<<<<<<< " CONFLICT_END = ">>>>>>> " CONFLICT_START_BYTES = []byte(CONFLICT_START) CONFLICT_END_BYTES = []byte(CONFLICT_END) )
Functions ¶
func ColoredConflictFile ¶
func FileHasConflictMarkers ¶ added in v0.35.0
tells us whether a file actually has inline merge conflicts. We need to run this because git will continue showing a status of 'UU' even after the conflicts have been resolved in the user's editor
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
type State ¶ added in v0.28.1
type State struct {
// contains filtered or unexported fields
}
State represents the selection state of the merge conflict context.
func (*State) AllConflictsResolved ¶ added in v0.35.0
func (*State) ContentAfterConflictResolve ¶ added in v0.28.1
func (*State) GetConflictMiddle ¶ added in v0.28.1
func (*State) GetContent ¶ added in v0.35.0
func (*State) GetSelectedLine ¶ added in v0.35.0
func (*State) GetSelectedRange ¶ added in v0.38.0
func (*State) NoConflicts ¶ added in v0.28.1
func (*State) PlainRenderSelected ¶ added in v0.38.0
func (*State) PushContent ¶ added in v0.35.0
this is for when you've resolved a conflict. This allows you to undo to a previous state
func (*State) ResetConflictSelection ¶ added in v0.36.0
func (s *State) ResetConflictSelection()
we're not resetting selectedIndex here because the user typically would want to pick either all top hunks or all bottom hunks so we retain that selection
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) SetContent ¶ added in v0.35.0
this is for starting a new merge conflict session