]> git.pld-linux.org Git - packages/mc.git/blame - mc-no-ws-visible.patch
- patch removing new feature of mc 4.6.2pre1, tabs were displayed as arrows
[packages/mc.git] / mc-no-ws-visible.patch
CommitLineData
dbf7ccf8 1diff -urNp mc-4.6.2-pre1.orig/edit/editdraw.c mc-4.6.2-pre1/edit/editdraw.c
2--- mc-4.6.2-pre1.orig/edit/editdraw.c 2007-08-27 14:06:03.000000000 +0200
3+++ mc-4.6.2-pre1/edit/editdraw.c 2008-05-05 12:00:49.000000000 +0200
4@@ -51,7 +51,6 @@
5 #define MOD_BOLD (1 << 9)
6 #define MOD_MARKED (1 << 10)
7 #define MOD_CURSOR (1 << 11)
8-#define MOD_WHITESPACE (1 << 12)
9
10 #define FONT_OFFSET_X 0
11 #define FONT_OFFSET_Y 0
12@@ -244,27 +243,12 @@ print_to_widget (WEdit *edit, long row,
13 color = 0;
14 }
15
16- if (style & MOD_WHITESPACE) {
17- if (style & MOD_MARKED) {
18- textchar = ' ';
19- set_color (EDITOR_MARKED_COLOR);
20- } else {
21-#if 0
22- if (color != EDITOR_NORMAL_COLOR) {
23- textchar = ' ';
24- lowlevel_set_color (color);
25- } else
26-#endif
27- set_color (EDITOR_WHITESPACE_COLOR);
28- }
29+ if (style & MOD_BOLD) {
30+ set_color (EDITOR_BOLD_COLOR);
31+ } else if (style & MOD_MARKED) {
32+ set_color (EDITOR_MARKED_COLOR);
33 } else {
34- if (style & MOD_BOLD) {
35- set_color (EDITOR_BOLD_COLOR);
36- } else if (style & MOD_MARKED) {
37- set_color (EDITOR_MARKED_COLOR);
38- } else {
39- lowlevel_set_color (color);
40- }
41+ lowlevel_set_color (color);
42 }
43
44 addch (textchar);
45@@ -272,8 +256,6 @@ print_to_widget (WEdit *edit, long row,
46 }
47 }
48
49-int visible_tabs = 1, visible_tws = 1;
50-
51 /* b is a pointer to the beginning of the line */
52 static void
53 edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
54@@ -281,7 +263,7 @@ edit_draw_this_line (WEdit *edit, long b
55 {
56 static unsigned int line[MAX_LINE_LEN];
57 unsigned int *p = line;
58- long m1 = 0, m2 = 0, q, c1, c2, tws;
59+ long m1 = 0, m2 = 0, q, c1, c2;
60 int col, start_col_real;
61 unsigned int c;
62 int color;
63@@ -299,13 +281,6 @@ edit_draw_this_line (WEdit *edit, long b
64 eval_marks (edit, &m1, &m2);
65
66 if (row <= edit->total_lines - edit->start_line) {
67- if (use_colors && visible_tws) {
68- tws = edit_eol (edit, b);
69- while (tws > b && ((c = edit_get_byte (edit, tws - 1)) == ' '
70- || c == '\t'))
71- tws--;
72- }
73-
74 while (col <= end_col - edit->start_col) {
75 *p = 0;
76 if (q == edit->curs1)
77@@ -328,6 +303,7 @@ edit_draw_this_line (WEdit *edit, long b
78 /* we don't use bg for mc - fg contains both */
79 edit_get_syntax_color (edit, q, &color);
80 *p |= color << 16;
81+ q++;
82 switch (c) {
83 case '\n':
84 col = end_col - edit->start_col + 1; /* quit */
85@@ -335,38 +311,12 @@ edit_draw_this_line (WEdit *edit, long b
86 break;
87 case '\t':
88 i = TAB_SIZE - ((int) col % TAB_SIZE);
89+ *p |= ' ';
90+ c = *(p++) & ~MOD_CURSOR;
91 col += i;
92- if (use_colors && visible_tabs) {
93- c = (*p & ~MOD_CURSOR) | MOD_WHITESPACE;
94- if (i > 2) {
95- *(p++) |= '<' | MOD_WHITESPACE;
96- while (--i > 1)
97- *(p++) = c | '-';
98- *(p++) = c | '>';
99- } else if (i > 1) {
100- *(p++) |= '<' | MOD_WHITESPACE;
101- *(p++) = c | '>';
102- } else
103- *(p++) |= '>' | MOD_WHITESPACE;
104- } else if (use_colors && visible_tws && q >= tws) {
105- *p |= '.' | MOD_WHITESPACE;
106- c = *(p++) & ~MOD_CURSOR;
107- while (--i)
108- *(p++) = c;
109- } else {
110- *p |= ' ';
111- c = *(p++) & ~MOD_CURSOR;
112- while (--i)
113- *(p++) = c;
114- }
115+ while (--i)
116+ *(p++) = c;
117 break;
118- case ' ':
119- if (use_colors && visible_tws && q >= tws) {
120- *(p++) |= '.' | MOD_WHITESPACE;
121- col++;
122- break;
123- }
124- /* fallthrough */
125 default:
126 c = convert_to_display_c (c);
127
128@@ -392,7 +342,6 @@ edit_draw_this_line (WEdit *edit, long b
129 col++;
130 break;
131 }
132- q++;
133 }
134 }
135 } else {
136diff -urNp mc-4.6.2-pre1.orig/src/color.c mc-4.6.2-pre1/src/color.c
137--- mc-4.6.2-pre1.orig/src/color.c 2007-08-27 14:06:02.000000000 +0200
138+++ mc-4.6.2-pre1/src/color.c 2008-05-05 12:00:49.000000000 +0200
139@@ -99,10 +99,9 @@ static struct colorpair color_map [] = {
140 { "editnormal=", 0, 0 }, /* normal */ /* 34 */
141 { "editbold=", 0, 0 }, /* search->found */
142 { "editmarked=", 0, 0 }, /* marked/selected */
143- { "editwhitespace=", 0, 0 }, /* whitespace */
144
145-/* error dialog colors start at 38 */
146- { "errdhotnormal=", 0, 0 }, /* Error dialog normal/hot */ /* 38 */
147+/* error dialog colors start at 37 */
148+ { "errdhotnormal=", 0, 0 }, /* Error dialog normal/hot */ /* 37 */
149 { "errdhotfocus=", 0, 0 }, /* Error dialog focused/hot */
150 };
151
152@@ -165,7 +164,6 @@ static const char *default_colors =
153 "editnormal=lightgray,blue:"
154 "editbold=yellow,blue:"
155 "editmarked=black,cyan:"
156-"editwhitespace=brightblue,blue:"
157 "errdhotnormal=yellow,red:"
158 "errdhotfocus=yellow,lightgray";
159
160diff -urNp mc-4.6.2-pre1.orig/src/color.h mc-4.6.2-pre1/src/color.h
161--- mc-4.6.2-pre1.orig/src/color.h 2007-08-27 14:06:02.000000000 +0200
162+++ mc-4.6.2-pre1/src/color.h 2008-05-05 12:00:49.000000000 +0200
163@@ -71,19 +71,17 @@ extern int alarm_colors[4];
164 #define DEFAULT_COLOR IF_COLOR (DEFAULT_COLOR_INDEX, 0)
165
166 /*
167- * editor colors - only 4 for normal, search->found, select, and whitespace
168- * respectively
169+ * editor colors - only 3 for normal, search->found, and select, respectively
170 * Last is defined to view color.
171 */
172 #define EDITOR_NORMAL_COLOR_INDEX 34
173 #define EDITOR_NORMAL_COLOR IF_COLOR (EDITOR_NORMAL_COLOR_INDEX, 0)
174 #define EDITOR_BOLD_COLOR IF_COLOR (35, A_BOLD)
175 #define EDITOR_MARKED_COLOR IF_COLOR (36, A_REVERSE)
176-#define EDITOR_WHITESPACE_COLOR IF_COLOR (37, 0 /* irrelevant */)
177
178 /* Error dialog colors */
179-#define ERROR_HOT_NORMAL IF_COLOR (38, 0)
180-#define ERROR_HOT_FOCUS IF_COLOR (39, 0)
181+#define ERROR_HOT_NORMAL IF_COLOR (37, 0)
182+#define ERROR_HOT_FOCUS IF_COLOR (38, 0)
183
184 #ifdef HAVE_SLANG
185 # define CTYPE const char *
This page took 0.085265 seconds and 4 git commands to generate.