From d1a6a23d64f64750e2faaeea0a7ed1235ecb49da Mon Sep 17 00:00:00 2001
From: Johan Walles <johan.walles@gmail.com>
Date: Thu, 20 Feb 2025 20:07:32 +0100
Subject: [PATCH] Support path splitting on Windows as well

By using `filepath` instead of `path`. `filepath` should work on
Windows.

Fixes #269.
---
 m/reader.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/m/reader.go b/m/reader.go
index 19fedd1..138ea97 100644
--- a/m/reader.go
+++ b/m/reader.go
@@ -7,7 +7,7 @@ import (
 	"fmt"
 	"io"
 	"os"
-	"path"
+	"path/filepath"
 	"runtime/debug"
 	"strings"
 	"sync"
@@ -641,7 +641,7 @@ func highlightFromMemory(reader *Reader, formatter chroma.Formatter, options Rea
 func (reader *Reader) createStatusUnlocked(lastLine linenumbers.LineNumber) string {
 	prefix := ""
 	if reader.name != nil {
-		prefix = path.Base(*reader.name) + ": "
+		prefix = filepath.Base(*reader.name) + ": "
 	}
 
 	if len(reader.lines) == 0 {