src/Tools/jEdit/patches/vfs_marker
author wenzelm
Sun Feb 24 12:49:32 2019 +0100 (2 months ago ago)
changeset 70019 4419d4d675c3
parent 69781 c5778547ed03
permissions -rw-r--r--
formal update of patches -- no change of content;
wenzelm@70019
     1
diff -ru 5.5.0/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java 5.5.0/jEdit-patched/org/gjt/sp/jedit/browser/VFSBrowser.java
wenzelm@70019
     2
--- 5.5.0/jEdit/org/gjt/sp/jedit/browser/VFSBrowser.java	2018-04-09 01:57:42.000000000 +0200
wenzelm@70019
     3
+++ 5.5.0/jEdit-patched/org/gjt/sp/jedit/browser/VFSBrowser.java	2019-02-24 12:23:42.403199825 +0100
wenzelm@69781
     4
@@ -1204,6 +1204,7 @@
wenzelm@69781
     5
 		VFSFile[] selectedFiles = browserView.getSelectedFiles();
wenzelm@69781
     6
 
wenzelm@69781
     7
 		Buffer buffer = null;
wenzelm@69781
     8
+		String bufferMarker = null;
wenzelm@69781
     9
 
wenzelm@69781
    10
 check_selected:
wenzelm@69781
    11
 		for (VFSFile file : selectedFiles)
wenzelm@69781
    12
@@ -1253,7 +1254,10 @@
wenzelm@69781
    13
 				}
wenzelm@69781
    14
 
wenzelm@69781
    15
 				if (_buffer != null)
wenzelm@69781
    16
+				{
wenzelm@69781
    17
 					buffer = _buffer;
wenzelm@69781
    18
+					bufferMarker = file.getPathMarker();
wenzelm@69781
    19
+				}
wenzelm@69781
    20
 			}
wenzelm@69781
    21
 			// otherwise if a file is selected in OPEN_DIALOG or
wenzelm@69781
    22
 			// SAVE_DIALOG mode, just let the listener(s)
wenzelm@69781
    23
@@ -1262,21 +1266,30 @@
wenzelm@69781
    24
 
wenzelm@69781
    25
 		if(buffer != null)
wenzelm@69781
    26
 		{
wenzelm@69781
    27
+			View gotoView = null;
wenzelm@69781
    28
+
wenzelm@69781
    29
 			switch(mode)
wenzelm@69781
    30
 			{
wenzelm@69781
    31
 			case M_OPEN:
wenzelm@69781
    32
 				view.setBuffer(buffer);
wenzelm@69781
    33
+				gotoView = view;
wenzelm@69781
    34
 				break;
wenzelm@69781
    35
 			case M_OPEN_NEW_VIEW:
wenzelm@69781
    36
-				jEdit.newView(view,buffer,false);
wenzelm@69781
    37
+				gotoView = jEdit.newView(view,buffer,false);
wenzelm@69781
    38
 				break;
wenzelm@69781
    39
 			case M_OPEN_NEW_PLAIN_VIEW:
wenzelm@69781
    40
-				jEdit.newView(view,buffer,true);
wenzelm@69781
    41
+				gotoView = jEdit.newView(view,buffer,true);
wenzelm@69781
    42
 				break;
wenzelm@69781
    43
 			case M_OPEN_NEW_SPLIT:
wenzelm@69781
    44
 				view.splitHorizontally().setBuffer(buffer);
wenzelm@69781
    45
+				gotoView = view;
wenzelm@69781
    46
 				break;
wenzelm@69781
    47
 			}
wenzelm@69781
    48
+
wenzelm@69781
    49
+			if (gotoView != null && bufferMarker != null)
wenzelm@69781
    50
+			{
wenzelm@69781
    51
+				jEdit.gotoMarker(gotoView, buffer, bufferMarker);
wenzelm@69781
    52
+			}
wenzelm@69781
    53
 		}
wenzelm@69781
    54
 
wenzelm@69781
    55
 		Object[] listeners = listenerList.getListenerList();
wenzelm@70019
    56
diff -ru 5.5.0/jEdit/org/gjt/sp/jedit/io/VFSFile.java 5.5.0/jEdit-patched/org/gjt/sp/jedit/io/VFSFile.java
wenzelm@70019
    57
--- 5.5.0/jEdit/org/gjt/sp/jedit/io/VFSFile.java	2018-04-09 01:57:13.000000000 +0200
wenzelm@70019
    58
+++ 5.5.0/jEdit-patched/org/gjt/sp/jedit/io/VFSFile.java	2019-02-24 12:23:42.403199825 +0100
wenzelm@69781
    59
@@ -297,6 +297,12 @@
wenzelm@69781
    60
 		}
wenzelm@69781
    61
 	} //}}}
wenzelm@69781
    62
 
wenzelm@69781
    63
+	//{{{ getPathMarker() method (for jEdit.gotoMarker)
wenzelm@69781
    64
+	public String getPathMarker()
wenzelm@69781
    65
+	{
wenzelm@69781
    66
+		return null;
wenzelm@69781
    67
+	} //}}}
wenzelm@69781
    68
+
wenzelm@69781
    69
 	//{{{ getPath() method
wenzelm@69781
    70
 	public String getPath()
wenzelm@69781
    71
 	{
wenzelm@69781
    72
diff -ru 5.5.0/jEdit/org/gjt/sp/jedit/jEdit.java 5.5.0/jEdit-patched/org/gjt/sp/jedit/jEdit.java
wenzelm@70019
    73
--- 5.5.0/jEdit/org/gjt/sp/jedit/jEdit.java	2018-04-09 01:56:22.000000000 +0200
wenzelm@70019
    74
+++ 5.5.0/jEdit-patched/org/gjt/sp/jedit/jEdit.java	2019-02-24 12:23:42.403199825 +0100
wenzelm@69781
    75
@@ -4479,7 +4479,7 @@
wenzelm@69781
    76
 	} //}}}
wenzelm@69781
    77
 
wenzelm@69781
    78
 	//{{{ gotoMarker() method
wenzelm@69781
    79
-	private static void gotoMarker(final View view, final Buffer buffer,
wenzelm@69781
    80
+	public static void gotoMarker(final View view, final Buffer buffer,
wenzelm@69781
    81
 		final String marker)
wenzelm@69781
    82
 	{
wenzelm@69781
    83
 		AwtRunnableQueue.INSTANCE.runAfterIoTasks(new Runnable()