src/Tools/jEdit/patches/folding
author wenzelm
Tue, 08 Sep 2020 21:14:42 +0200
changeset 72247 c06260b7152c
parent 71932 65fd0f032a75
child 73653 d9823224fcfe
permissions -rw-r--r--
update to official jedit-5.6.0;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
72247
c06260b7152c update to official jedit-5.6.0;
wenzelm
parents: 71932
diff changeset
     1
diff -ru 5.6.0/jEdit-orig/org/gjt/sp/jedit/buffer/JEditBuffer.java 5.6.0/jEdit-patched/org/gjt/sp/jedit/buffer/JEditBuffer.java
c06260b7152c update to official jedit-5.6.0;
wenzelm
parents: 71932
diff changeset
     2
--- 5.6.0/jEdit-orig/org/gjt/sp/jedit/buffer/JEditBuffer.java	2020-09-03 05:31:04.000000000 +0200
c06260b7152c update to official jedit-5.6.0;
wenzelm
parents: 71932
diff changeset
     3
+++ 5.6.0/jEdit-patched/org/gjt/sp/jedit/buffer/JEditBuffer.java	2020-09-08 20:13:23.573139959 +0200
71932
65fd0f032a75 updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents: 69838
diff changeset
     4
@@ -1968,29 +1968,23 @@
58702
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
     5
 			{
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
     6
 				Segment seg = new Segment();
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
     7
 				newFoldLevel = foldHandler.getFoldLevel(this,i,seg);
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
     8
-				if(newFoldLevel != lineMgr.getFoldLevel(i))
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
     9
+				if(Debug.FOLD_DEBUG)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    10
+					Log.log(Log.DEBUG,this,i + " fold level changed");
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    11
+				changed = true;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    12
+				// Update preceding fold levels if necessary
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    13
+				List<Integer> precedingFoldLevels =
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    14
+					foldHandler.getPrecedingFoldLevels(
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    15
+						this,i,seg,newFoldLevel);
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    16
+				if (precedingFoldLevels != null)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    17
 				{
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    18
-					if(Debug.FOLD_DEBUG)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    19
-						Log.log(Log.DEBUG,this,i + " fold level changed");
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    20
-					changed = true;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    21
-					// Update preceding fold levels if necessary
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    22
-					if (i == firstInvalidFoldLevel)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    23
+					int j = i;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    24
+					for (Integer foldLevel: precedingFoldLevels)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    25
 					{
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    26
-						List<Integer> precedingFoldLevels =
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    27
-							foldHandler.getPrecedingFoldLevels(
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    28
-								this,i,seg,newFoldLevel);
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    29
-						if (precedingFoldLevels != null)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    30
-						{
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    31
-							int j = i;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    32
-							for (Integer foldLevel: precedingFoldLevels)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    33
-							{
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    34
-								j--;
71932
65fd0f032a75 updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents: 69838
diff changeset
    35
-								lineMgr.setFoldLevel(j, foldLevel);
58702
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    36
-							}
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    37
-							if (j < firstUpdatedFoldLevel)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    38
-								firstUpdatedFoldLevel = j;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    39
-						}
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    40
+						j--;
71932
65fd0f032a75 updated to jedit-5.6pre1 (repository version 25349);
wenzelm
parents: 69838
diff changeset
    41
+						lineMgr.setFoldLevel(j, foldLevel);
58702
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    42
 					}
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    43
+					if (j < firstUpdatedFoldLevel)
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    44
+						firstUpdatedFoldLevel = j;
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    45
 				}
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    46
 				lineMgr.setFoldLevel(i,newFoldLevel);
39866de9d988 always apply precedingFoldLevels, avoid unclear shortcuts;
wenzelm
parents:
diff changeset
    47
 			}