From ef1a141347045b1c3d1d8ad36b510af92730ae03 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 3 Jul 2025 18:10:16 +0200 Subject: [PATCH] Export PatchLine.isChange --- pkg/commands/patch/format.go | 2 +- pkg/commands/patch/patch_line.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/patch/format.go b/pkg/commands/patch/format.go index ccfc7924d..afd09df4b 100644 --- a/pkg/commands/patch/format.go +++ b/pkg/commands/patch/format.go @@ -97,7 +97,7 @@ func (self *patchPresenter) format() string { for _, line := range hunk.bodyLines { style := self.patchLineStyle(line) - if line.isChange() { + if line.IsChange() { appendLine(self.formatLine(line.Content, style, lineIdx)) } else { appendLine(self.formatLineAux(line.Content, style, false)) diff --git a/pkg/commands/patch/patch_line.go b/pkg/commands/patch/patch_line.go index 994d7c4e9..78eef3a19 100644 --- a/pkg/commands/patch/patch_line.go +++ b/pkg/commands/patch/patch_line.go @@ -18,7 +18,7 @@ type PatchLine struct { Content string // something like '+ hello' (note the first character is not removed) } -func (self *PatchLine) isChange() bool { +func (self *PatchLine) IsChange() bool { return self.Kind == ADDITION || self.Kind == DELETION }