aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-08-18 23:12:39 +0800
committerpeter <peter@FreeBSD.org>1996-08-18 23:12:39 +0800
commitb11c71900e2ca46c8c4c6e07edf451648660277f (patch)
tree17bba81a11df9f1883ac11cb947b02f22ec1e6db
parentbf0dedb9660049d528d71bb35fd3f685107a69a7 (diff)
downloadfreebsd-ports-gnome-b11c71900e2ca46c8c4c6e07edf451648660277f.tar.gz
freebsd-ports-gnome-b11c71900e2ca46c8c4c6e07edf451648660277f.tar.zst
freebsd-ports-gnome-b11c71900e2ca46c8c4c6e07edf451648660277f.zip
Work around what appears to be a ncurses bug. The command line at the
bottom of the screen can sometimes have stray characters left behind from the previous command. This seems to be because ncurses is ignoreing a ``wprintw(window, "%s", " ")'' when it's in the last column of a window. I dont know who is right, ncurses or ncftp. This workaround also makes the code a little cleaner as a side effect. :-)
-rw-r--r--ftp/ncftp2/files/patch-ab28
1 files changed, 28 insertions, 0 deletions
diff --git a/ftp/ncftp2/files/patch-ab b/ftp/ncftp2/files/patch-ab
new file mode 100644
index 000000000000..97726f007458
--- /dev/null
+++ b/ftp/ncftp2/files/patch-ab
@@ -0,0 +1,28 @@
+#
+# This is to work around an apparent ncurses bug.. It's a slight optimisation
+# too, I think.
+#
+--- Win.c.dist Wed Dec 6 13:38:47 1995
++++ Win.c Sun Aug 18 23:08:11 1996
+@@ -1101,16 +1101,12 @@
+ Exit(kExitWinFail2);
+ }
+
++ werase(gPromptWin);
+ WAttr(gPromptWin, flags, 1);
+- if (addTail) {
+- mvwprintw(gPromptWin, 0,0, "%s%s", pr, kPromptTail);
+- WAttr(gPromptWin, flags, 0);
+- } else {
+- mvwprintw(gPromptWin, 0,0, "%s", pr);
+- WAttr(gPromptWin, flags, 0);
+- if (flags & kReverse)
+- wprintw(gPromptWin, " ");
+- }
++ mvwprintw(gPromptWin, 0,0, "%s", pr);
++ if (addTail)
++ wprintw(gPromptWin, "%s", kPromptTail);
++ WAttr(gPromptWin, flags, 0);
+ wnoutrefresh(gPromptWin);
+ werase(gInputWin);
+ touchwin(gInputWin);