2
3
zrcadlo https://github.com/sammy-ette/Hilbish synchronizováno 2025-08-10 02:52:03 +00:00

fix: prevent writing empty line to history

Tento commit je obsažen v:
TorchedSammy 2022-03-04 22:04:44 -04:00
rodič f26ef935dd
revize 92f279e5cf
Podepsáno: sammyette
ID GPG klíče: 904FC49417B44DCD

Zobrazit soubor

@ -38,6 +38,10 @@ func newFileHistory() (*fileHistory, error) {
}
func (h *fileHistory) Write(line string) (int, error) {
if line == "" {
return len(h.items), nil
}
_, err := h.f.WriteString(line + "\n")
if err != nil {
return 0, err