From 9d0eb20ac5a237810a42847431c7b88612fce6b2 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Apr 2023 09:17:29 -1000 Subject: [PATCH] ;dev: improve comment --- hledger-lib/Hledger/Data/Errors.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Errors.hs b/hledger-lib/Hledger/Data/Errors.hs index 12d71d64a..424090152 100644 --- a/hledger-lib/Hledger/Data/Errors.hs +++ b/hledger-lib/Hledger/Data/Errors.hs @@ -125,9 +125,9 @@ makePostingErrorExcerpt p findpostingerrorcolumns = commentExtraLines (tcomment t) + sum (map postingLines $ take pindex $ tpostings t) where + -- How many lines are used to render this posting ? postingLines p' = 1 + commentExtraLines (pcomment p') - -- How many extra lines does this possibly multi-line - -- transaction/posting comment add when rendered ? + -- How many extra lines does this comment add to a transaction or posting rendering ? commentExtraLines c = max 0 (length (T.lines c) - 1) errabsline = unPos tl + errrelline txntxt = showTransaction t & textChomp & (<>"\n")