[PATCH 2/3] Act on WS_WARN for ws_mode_space_before_tab.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: David Symonds <dsymonds@xxxxxxxxx>
---
 diff.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/diff.c b/diff.c
index a6aaaf7..6f9b624 100644
--- a/diff.c
+++ b/diff.c
@@ -508,8 +508,12 @@ static void emit_line_with_ws(int nparents,
 	for (i = col0; i < len; i++) {
 		if (line[i] == '\t') {
 			last_tab_in_indent = i;
-			if (0 <= last_space_in_indent)
-				need_highlight_leading_space = 1;
+			if ((ws_mode_space_before_tab != WS_OKAY) &&
+			    (0 <= last_space_in_indent)) {
+				if (ws_mode_space_before_tab == WS_WARN)
+					need_highlight_leading_space = 1;
+				/* TODO: handle WS_ERROR and WS_AUTOFIX */
+			}
 		}
 		else if (line[i] == ' ')
 			last_space_in_indent = i;
-- 
1.5.3.1
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux