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 ¶
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 ¶
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 ¶
type State struct {
// contains filtered or unexported fields
}
State represents the selection state of the merge conflict context.
func (*State) AllConflictsResolved ¶
func (*State) ContentAfterConflictResolve ¶
func (*State) GetConflictMiddle ¶
func (*State) GetContent ¶
func (*State) GetSelectedLine ¶
func (*State) GetSelectedRange ¶
func (*State) NoConflicts ¶
func (*State) PlainRenderSelected ¶
func (*State) PushContent ¶
this is for when you've resolved a conflict. This allows you to undo to a previous state
func (*State) ResetConflictSelection ¶
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 ¶
func (s *State) SelectNextConflict()
func (*State) SelectNextConflictHunk ¶
func (s *State) SelectNextConflictHunk()
func (*State) SelectPrevConflict ¶
func (s *State) SelectPrevConflict()
func (*State) SelectPrevConflictHunk ¶
func (s *State) SelectPrevConflictHunk()
func (*State) SetContent ¶
this is for starting a new merge conflict session