File: indent_cmt.patch

package info (click to toggle)
librnd 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,812 kB
  • sloc: ansic: 126,990; sh: 2,602; makefile: 2,145; awk: 7
file content (18 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -uri indent-2.2.11.orig/src/comments.c indent-2.2.11/src/comments.c
--- indent-2.2.11.orig/src/comments.c	2018-01-26 13:45:48.474640060 +0100
+++ indent-2.2.11/src/comments.c	2018-01-26 14:47:06.867653819 +0100
@@ -339,7 +339,13 @@
          start_column = count_columns (compute_label_target (), s_lab, NULL_CHAR);
       }
 
-      if (start_column < target)
+      if (target == 0)
+      {
+         /* 0 means start right after the end of the line, adding a space, no alignment */
+         *e_com++ = ' ';
+         column++;
+      }
+      else if (start_column < target)
       {
          start_column = target;
       }