Blob Blame History Raw
From b0a4d13dadbc96fd9950ee67fe4d6241faad56e5 Mon Sep 17 00:00:00 2001
From: christos <christos>
Date: Sun, 17 Jul 2016 15:02:44 +0000
Subject: [PATCH 1/2] For multiline prompt (do control chars first).
Kensuke Iwahashi/David Kaspar: set prompt="%~\n%%" ctrl-p, ctrl-u

---
 tc.nls.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tc.nls.c b/tc.nls.c
index 6158097..60ce2f7 100644
--- a/tc.nls.c
+++ b/tc.nls.c
@@ -143,6 +143,13 @@ NLSClassify(Char c, int nocomb, int drawPrompt)
 	if (c >= 0x10000)		/*    U+10000 = F0 90 80 80 */
 	    return NLSCLASS_ILLEGAL2;
     }
+    if (Iscntrl(c) && (c & CHAR) < 0x100) {
+	if (c == '\n')
+	    return NLSCLASS_NL;
+	if (c == '\t')
+	    return NLSCLASS_TAB;
+	return NLSCLASS_CTRL;
+    }
     w = NLSWidth(c);
     if (drawPrompt) {			/* draw prompt */
 	if (w > 0)
@@ -152,12 +159,5 @@ NLSClassify(Char c, int nocomb, int drawPrompt)
     }
     if ((w > 0 && !(Iscntrl(c) && (c & CHAR) < 0x100)) || (Isprint(c) && !nocomb))
 	return w;
-    if (Iscntrl(c) && (c & CHAR) < 0x100) {
-	if (c == '\n')
-	    return NLSCLASS_NL;
-	if (c == '\t')
-	    return NLSCLASS_TAB;
-	return NLSCLASS_CTRL;
-    }
     return NLSCLASS_ILLEGAL;
 }
-- 
2.5.5


From 8d61ab6c7e7ad2db3fca0ad51e216c49bca14125 Mon Sep 17 00:00:00 2001
From: christos <christos>
Date: Sun, 17 Jul 2016 15:03:34 +0000
Subject: [PATCH 2/2] mention multi-line prompt fix.

---
 Fixes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Fixes b/Fixes
index 981d676..c1b4537 100644
--- a/Fixes
+++ b/Fixes
@@ -1,3 +1,4 @@
+ 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar)
  12. PR/526: Fix double \\ printing from previous fix in history expansion.
  10. PR/526: Quote backslashes properly so they can be preserved in ``
      expansions
-- 
2.5.5