From 0ae6dd9422cd3f13c44ffa18a7d3257998dd3e4e Mon Sep 17 00:00:00 2001 From: HAYAMA_Kaoru Date: Fri, 29 Nov 2024 13:03:49 +0900 Subject: [PATCH] Do not pop the line not terminating with `\n` --- watcher.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/watcher.go b/watcher.go index 793a229..9a0a4ec 100644 --- a/watcher.go +++ b/watcher.go @@ -40,8 +40,6 @@ func (W *Watcher) updateLastLine() { newLinePos := strings.LastIndexByte(W.lastline, '\n') if newLinePos >= 0 { W.lastline = W.lastline[newLinePos+1:] - } else { - W.lastline = "" } }