From af7ea75056b496a083ba69309b98b95448046036 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Mon, 18 Jul 2016 13:53:11 +0200 Subject: [PATCH] tcsh-6.19.00-032-fix-multiline-prompt.patch added Resolves: #1351056 --- tcsh-6.19.00-032-fix-multiline-prompt.patch | 66 +++++++++++++++++++++ tcsh.spec | 6 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 tcsh-6.19.00-032-fix-multiline-prompt.patch diff --git a/tcsh-6.19.00-032-fix-multiline-prompt.patch b/tcsh-6.19.00-032-fix-multiline-prompt.patch new file mode 100644 index 0000000..ef317fb --- /dev/null +++ b/tcsh-6.19.00-032-fix-multiline-prompt.patch @@ -0,0 +1,66 @@ +From 2feaa8545dbc8b422d34412698262b3dc860653c Mon Sep 17 00:00:00 2001 +From: 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 7fe5e55b5ebf819fad8f3571bbc008b2983882de Mon Sep 17 00:00:00 2001 +From: 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 ce17ff9..fc7ba77 100644 +--- a/Fixes ++++ b/Fixes +@@ -1,3 +1,4 @@ ++ 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar) + 13. always send prusage to stdout. + 12. PR/526: Fix double \\ printing from previous fix in history expansion. + 10. PR/526: Quote backslashes properly so they can be preserved in `` +-- +2.5.5 + diff --git a/tcsh.spec b/tcsh.spec index 1539812..d73a17c 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -1,7 +1,7 @@ Name: tcsh Summary: An enhanced version of csh, the C shell Version: 6.19.00 -Release: 12%{?dist} +Release: 13%{?dist} License: BSD Group: System Environment/Shells URL: http://www.tcsh.org/ @@ -60,6 +60,7 @@ Patch028: tcsh-6.19.00-028-fix-wrong-ifdef.patch Patch029: tcsh-6.19.00-029-do-not-print-jobs-to-stderr.patch Patch030: tcsh-6.19.00-030-new-testcases-for-testsuite.patch Patch031: tcsh-6.19.00-031-always-send-prusage-to-stdout.patch +Patch032: tcsh-6.19.00-032-fix-multiline-prompt.patch # Downstream patches -- these should be always included when doing rebase: @@ -182,6 +183,9 @@ fi %changelog +* Mon Jul 18 2016 David Kaspar [Dee'Kej] - 6.19.00-13 +- Added tcsh-6.19.00-032-fix-multiline-prompt.patch (bug #1351056) + * Mon Jul 18 2016 David Kaspar [Dee'Kej] - 6.19.00-12 - Added tcsh-6.19.00-031-always-send-prusage-to-stdout.patch, to fix regression in: tcsh-6.19.00-026-quote-backslashes-properly.patch