patch: fix indentation erors in text.c

Ivan Skytte Jørgensen isj-nedit-dev at i1.dk
Mon Oct 15 23:05:26 CEST 2007


The attached patch fixes the indentation errors in text.c

text.c still has a mixture of tabs and spaces. This patch only uses spaces. 
forwardWordAP() could be fixed completely wrt. tabs  but I have kept this 
patch minimal.
-------------- next part --------------
diff -r -U3 nedit.isj7/source/text.c nedit.isj8/source/text.c
--- nedit.isj7/source/text.c	2007-10-02 17:47:08.000000000 +0200
+++ nedit.isj8/source/text.c	2007-10-15 22:59:41.000000000 +0200
@@ -2496,7 +2496,7 @@
     	return;
     if (insertPos == lineStart) {
         ringIfNecessary(silent, w);
-    return;
+        return;
     }
     pos = max(insertPos - 1, 0);
     while (strchr(delimiters, BufGetCharacter(textD->buffer, pos)) != NULL &&
@@ -2604,7 +2604,7 @@
     
     cancelDrag(w);
     if (!TextDMoveRight(((TextWidget)w)->text.textD))
-    ringIfNecessary(silent, w);
+        ringIfNecessary(silent, w);
     checkMoveSelectionChange(w, event, insertPos, args, nArgs);
     checkAutoShowInsertPos(w);
     callCursorMovementCBs(w, event);
@@ -2618,7 +2618,7 @@
     
     cancelDrag(w);
     if (!TextDMoveLeft(((TextWidget)w)->text.textD))
-    ringIfNecessary(silent, w);
+        ringIfNecessary(silent, w);
     checkMoveSelectionChange(w, event, insertPos, args, nArgs);
     checkAutoShowInsertPos(w);
     callCursorMovementCBs(w, event);
@@ -2639,22 +2639,22 @@
     	return;
     }
     pos = insertPos;
-	if (hasKey("tail", args, nArgs)) {
+    if (hasKey("tail", args, nArgs)) {
     	for (; pos<buf->length; pos++) {
-    		if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
-    	    	break;
+            if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
+                break;
     	}
     	if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
-        	pos = endOfWord((TextWidget)w, pos);
-	}
-	else {
+            pos = endOfWord((TextWidget)w, pos);
+    }
+    else {
     	if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
-        	pos = endOfWord((TextWidget)w, pos);
+            pos = endOfWord((TextWidget)w, pos);
     	for (; pos<buf->length; pos++) {
-    		if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
-    	    	break;
+            if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
+                break;
     	}
-	}
+    }
     TextDSetInsertPosition(textD, pos);
     checkMoveSelectionChange(w, event, insertPos, args, nArgs);
     checkAutoShowInsertPos(w);


More information about the Develop mailing list