]> git.pld-linux.org Git - packages/mc.git/commitdiff
- KISS, no need to remove all the code, just disable this feature;
authorTomasz Pala <gotar@pld-linux.org>
Tue, 3 Feb 2009 23:34:06 +0000 (23:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  non-unicode editor works now, someone check UTF8 please

Changed files:
    mc-no-ws-visible.patch -> 1.6

mc-no-ws-visible.patch

index a54c5265be6855abf2c1e6fea4562b736018085d..874fcdc45293a641d00428be76fb84e0ddcfbcd7 100644 (file)
 diff -urNp mc-4.6.2-pre1.orig/edit/editdraw.c mc-4.6.2-pre1/edit/editdraw.c
 --- mc-4.6.2-pre1.orig/edit/editdraw.c 2007-08-27 14:06:03.000000000 +0200
 +++ mc-4.6.2-pre1/edit/editdraw.c      2008-05-05 12:00:49.000000000 +0200
-@@ -52,7 +52,6 @@
- #define MOD_BOLD              (1 << 9)
- #define MOD_MARKED            (1 << 10)
- #define MOD_CURSOR            (1 << 11)
--#define MOD_WHITESPACE                (1 << 12)
- #define FONT_OFFSET_X 0
- #define FONT_OFFSET_Y 0
-@@ -245,27 +244,12 @@
-           color = 0;
-       }
--      if (style & MOD_WHITESPACE) {
--          if (style & MOD_MARKED) {
--              textchar = ' ';
--              set_color (EDITOR_MARKED_COLOR);
--          } else {
--#if 0
--              if (color != EDITOR_NORMAL_COLOR) {
--                  textchar = ' ';
--                  lowlevel_set_color (color);
--              } else
--#endif
--                  set_color (EDITOR_WHITESPACE_COLOR);
--          }
-+      if (style & MOD_BOLD) {
-+          set_color (EDITOR_BOLD_COLOR);
-+      } else if (style & MOD_MARKED) {
-+          set_color (EDITOR_MARKED_COLOR);
-       } else {
--          if (style & MOD_BOLD) {
--              set_color (EDITOR_BOLD_COLOR);
--          } else if (style & MOD_MARKED) {
--              set_color (EDITOR_MARKED_COLOR);
--          } else {
--              lowlevel_set_color (color);
--          }
-+          lowlevel_set_color (color);
-       }
-       addch (textchar);
-@@ -273,8 +257,6 @@
+@@ -296,7 +296,7 @@
      }
  }
  
 -int visible_tabs = 1, visible_tws = 1;
--
++int visible_tabs = 0, visible_tws = 0;
  /* b is a pointer to the beginning of the line */
  static void
- edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
-@@ -300,14 +282,6 @@
-       eval_marks (edit, &m1, &m2);
-       if (row <= edit->total_lines - edit->start_line) {
--              long tws;
--          if (use_colors && visible_tws) {
--              tws = edit_eol (edit, b);
--              while (tws > b && ((c = edit_get_byte (edit, tws - 1)) == ' '
--                                 || c == '\t'))
--                  tws--;
--          }
--
-           while (col <= end_col - edit->start_col) {
-               *p = 0;
-               if (q == edit->curs1)
-@@ -337,38 +311,12 @@
-                   break;
-               case '\t':
-                   i = TAB_SIZE - ((int) col % TAB_SIZE);
-+                  p->ch |= ' ';
-+                  c = p->style & ~MOD_CURSOR;
-                   col += i;
--                  if (use_colors && visible_tabs) {
--                      c = (*p & ~MOD_CURSOR) | MOD_WHITESPACE;
--                      if (i > 2) {
--                          *(p++) |= '<' | MOD_WHITESPACE;
--                          while (--i > 1)
--                              *(p++) = c | '-';
--                          *(p++) = c | '>';
--                      } else if (i > 1) {
--                          *(p++) |= '<' | MOD_WHITESPACE;
--                          *(p++) = c | '>';
--                      } else
--                          *(p++) |= '>' | MOD_WHITESPACE;
--                  } else if (use_colors && visible_tws && q >= tws) {
--                      *p |= '.' | MOD_WHITESPACE;
--                      c = *(p++) & ~MOD_CURSOR;
--                      while (--i)
--                          *(p++) = c;
--                  } else {
--                      *p |= ' ';
--                      c = *(p++) & ~MOD_CURSOR;
--                      while (--i)
--                          *(p++) = c;
--                  }
-+                  while (--i)
-+                      p->style = c;
-                   break;
--              case ' ':
--                  if (use_colors && visible_tws && q >= tws) {
--                      *(p++) |= '.' | MOD_WHITESPACE;
--                      col++;
--                      break;
--                  }
--                  /* fallthrough */
-               default:
-                   c = convert_to_display_c (c);
-@@ -394,7 +342,6 @@
-                   col++;
-                   break;
-               }
--              q++;
-           }
-       }
-     } else {
-diff -urNp mc-4.6.2-pre1.orig/src/color.c mc-4.6.2-pre1/src/color.c
---- mc-4.6.2-pre1.orig/src/color.c     2007-08-27 14:06:02.000000000 +0200
-+++ mc-4.6.2-pre1/src/color.c  2008-05-05 12:00:49.000000000 +0200
-@@ -99,10 +99,9 @@ static struct colorpair color_map [] = {
-     { "editnormal=",     0, 0 },      /* normal */       /* 34 */
-     { "editbold=",       0, 0 },      /* search->found */
-     { "editmarked=",     0, 0 },      /* marked/selected */
--    { "editwhitespace=", 0, 0 },      /* whitespace */
--/* error dialog colors start at 38 */
--    { "errdhotnormal=",  0, 0 }, /* Error dialog normal/hot */ /* 38 */
-+/* error dialog colors start at 37 */
-+    { "errdhotnormal=",  0, 0 }, /* Error dialog normal/hot */ /* 37 */
-     { "errdhotfocus=",   0, 0 }, /* Error dialog focused/hot */
- };
-@@ -165,7 +164,6 @@ static const char *default_colors =
- "editnormal=lightgray,blue:"
- "editbold=yellow,blue:"
- "editmarked=black,cyan:"
--"editwhitespace=brightblue,blue:"
- "errdhotnormal=yellow,red:"
- "errdhotfocus=yellow,lightgray";
-diff -urNp mc-4.6.2-pre1.orig/src/color.h mc-4.6.2-pre1/src/color.h
---- mc-4.6.2-pre1.orig/src/color.h     2007-08-27 14:06:02.000000000 +0200
-+++ mc-4.6.2-pre1/src/color.h  2008-05-05 12:00:49.000000000 +0200
-@@ -71,19 +71,17 @@ extern int alarm_colors[4];
- #define DEFAULT_COLOR      IF_COLOR (DEFAULT_COLOR_INDEX, 0)
- /*
-- * editor colors - only 4 for normal, search->found, select, and whitespace
-- * respectively
-+ * editor colors - only 3 for normal, search->found, and select, respectively
-  * Last is defined to view color.
-  */
- #define EDITOR_NORMAL_COLOR_INDEX    34
- #define EDITOR_NORMAL_COLOR          IF_COLOR (EDITOR_NORMAL_COLOR_INDEX, 0)
- #define EDITOR_BOLD_COLOR            IF_COLOR (35, A_BOLD)
- #define EDITOR_MARKED_COLOR          IF_COLOR (36, A_REVERSE)
--#define EDITOR_WHITESPACE_COLOR      IF_COLOR (37, 0 /* irrelevant */)
- /* Error dialog colors */
--#define ERROR_HOT_NORMAL   IF_COLOR (38, 0)
--#define ERROR_HOT_FOCUS    IF_COLOR (39, 0)
-+#define ERROR_HOT_NORMAL   IF_COLOR (37, 0)
-+#define ERROR_HOT_FOCUS    IF_COLOR (38, 0)
- #ifdef HAVE_SLANG
- #   define CTYPE const char *
This page took 0.153501 seconds and 4 git commands to generate.