File: redraw.patch

package info (click to toggle)
elvis-tiny 1.4-26
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,128 kB
  • sloc: ansic: 13,810; sh: 25; makefile: 13
file content (37 lines) | stat: -rw-r--r-- 948 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff '--exclude=debian' -ruN x/elvis-tiny-1.4.orig/redraw.c elvis-tiny-1.4/redraw.c
--- x/elvis-tiny-1.4.orig/redraw.c	1991-08-04 21:20:49.000000000 +0000
+++ elvis-tiny-1.4/redraw.c	2012-06-29 17:54:18.000000000 +0000
@@ -354,7 +354,16 @@
 		if (i == '\t' && !*o_list)
 		{
 			i = col + tabstop - (col % tabstop);
+#if 1
+			/*
+			 *	With modern terminals, autowrap occurs only
+			 *	if a new character is added after limitcol.
+			 *	-- miquels@cistron.nl 23-Jan-2002
+			 */
+			if (i < limitcol || (has_AM && i <= limitcol))
+#else
 			if (i < limitcol)
+#endif
 			{
 #ifdef CRUNCH
 				if (!clr && has_PT && !((i - leftcol) & 7))
@@ -450,7 +459,16 @@
 		clrtoeol();
 	}
 #endif
+#if 1
+	/*
+	 *	With modern terminals, autowrap occurs only
+	 *	if a new character is added after limitcol.
+	 *	-- miquels@cistron.nl 22-Feb-1998
+	 */
+	if (!has_AM || col <= limitcol)
+#else
 	if (!has_AM || col < limitcol)
+#endif
 	{
 		addch('\n');
 	}