summaryrefslogtreecommitdiffstats
path: root/pkg/gui/mergeconflicts
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-04-27 17:19:08 +0200
committerStefan Haller <stefan@haller-berlin.de>2024-05-15 13:27:01 +0200
commitf69eb6dc4875e662cfc95abf1600bba57b52ff54 (patch)
treec8e13fe711e3a12497f0132f60c38a4bf0590cf8 /pkg/gui/mergeconflicts
parente0a2d97f0f5fc1afd6796883ad5f848bf2e1ff87 (diff)
Use ScanLinesAndTruncateWhenLongerThanBuffer instead of bufio.ScanLines
Diffstat (limited to 'pkg/gui/mergeconflicts')
-rw-r--r--pkg/gui/mergeconflicts/find_conflicts.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/mergeconflicts/find_conflicts.go b/pkg/gui/mergeconflicts/find_conflicts.go
index 3802a66b7..c4d3a51a8 100644
--- a/pkg/gui/mergeconflicts/find_conflicts.go
+++ b/pkg/gui/mergeconflicts/find_conflicts.go
@@ -99,7 +99,7 @@ func FileHasConflictMarkers(path string) (bool, error) {
// Efficiently scans through a file looking for merge conflict markers. Returns true if it does
func fileHasConflictMarkersAux(file io.Reader) bool {
scanner := bufio.NewScanner(file)
- scanner.Split(bufio.ScanLines)
+ scanner.Split(utils.ScanLinesAndTruncateWhenLongerThanBuffer(bufio.MaxScanTokenSize))
for scanner.Scan() {
line := scanner.Bytes()