From 5666e9b6ab9d47a1c1a7f55e164044543bfe713d Mon Sep 17 00:00:00 2001 From: Salad Date: Wed, 23 Sep 2020 18:02:50 +0200 Subject: home improvement --- src/c_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/c_utils.c') diff --git a/src/c_utils.c b/src/c_utils.c index 16ed4f0..de71ef3 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -157,7 +157,7 @@ int16_t } nlines = c_get_line_num(line, tcaps->cpos, ft_strlen(msh->ps[0]), tcaps); ret = ft_printf("%s", line); - i = 0; + i = (nlines == (tcaps->lpos)) ? 0 : tcaps->ws.ws_col * (tcaps->lpos - 1); if (tcaps->cpos != len) { if (nlines != tcaps->lpos) -- cgit v1.2.3