sleep: no blank first line when there is nothing to report before the nap

This commit is contained in:
victortaelin 2026-07-25 18:48:22 -03:00
parent 50b688ab68
commit 909e28fec9

5
memo
View file

@ -389,8 +389,9 @@ def cmd_note(d, args):
def cmd_sleep(d, args):
T = log_len(d)
T, said = log_len(d), False
if args:
said = True
if len(args) != 2:
die("usage: memo sleep <lo>-<hi> \"<one line>\"")
m = re.fullmatch(r"(\d+)-(\d+)", args[0])
@ -413,7 +414,7 @@ def cmd_sleep(d, args):
if not nap:
print("Nothing left to compress.")
return
print("\n" + nap)
print(("\n" if said else "") + nap)
def cmd_forget(d, args):