From 8845d1a7c3754b697aff42e4e9367df753ce5176 Mon Sep 17 00:00:00 2001 From: Mohit Rathore Date: Wed, 30 Aug 2017 00:14:00 +0530 Subject: [PATCH] early codepoint breaking --- nnn.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nnn.c b/nnn.c index d563f3ed..06607599 100644 --- a/nnn.c +++ b/nnn.c @@ -1189,7 +1189,6 @@ unescape(const char *str) static void printent(struct entry *ent, int sel) { - return; static int ncols; if (PATH_MAX + 16 < COLS) @@ -1278,13 +1277,14 @@ printent_long(struct entry *ent, int sel) { // experimenting in this section const char *c = unescape(ent->name); - unsigned int i; - int count=0; - for(i=0;isize), unescape(ent->name), count); + int count = 30; + int goback=0; + if(ncols+goback>count) + while((ncols+goback)>count && mblen(c+(ncols+goback)-count, MB_CUR_MAX)==-1) + goback--; + snprintf(g_buf, ncols+goback, "%s%-16.16s %8.8s %s", CURSYM(sel), buf, coolsize(ent->size), unescape(ent->name)); } } else { if (S_ISDIR(ent->mode))