diff --git a/src/g_editor.c b/src/g_editor.c
index a6c914a5cf89d65456b77e1217812e06b607fc39..9b7b0334b7ce7b41744616c63b8f1d6fd9796b5e 100644
--- a/src/g_editor.c
+++ b/src/g_editor.c
@@ -3004,9 +3004,13 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
     int xwas = x->gl_editor->e_xwas,
         ywas = x->gl_editor->e_ywas;
     if (doit) sys_vgui(".x%lx.c delete x\n", x);
-    else sys_vgui(".x%lx.c coords x %d %d %d %d\n",
+    else {
+
+		sys_vgui(".x%lx.c coords x %d %d %d %d\n",
             x, x->gl_editor->e_xwas,
                 x->gl_editor->e_ywas, xpos, ypos);
+		sys_vgui("pdtk_check_scroll_on_motion .x%lx.c 0\n", x);
+	}
 
     if ((y1 = canvas_findhitbox(x, xwas, ywas, &x11, &y11, &x12, &y12))
         && (y2 = canvas_findhitbox(x, xpos, ypos, &x21, &y21, &x22, &y22)))
@@ -3100,7 +3104,7 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
 				// now check if explicit user-made connection into preset_node if kind other than message
 				// messages may be used to change node's operation
 				if (pd_class(&y2->g_pd) == preset_node_class && pd_class(&y1->g_pd) != message_class) {
-					error("preset node only accepts messages as input to set its destination preset_hub...\n");
+					error("preset node only accepts messages as input to adjust its settings...\n");
 					return;
 				}
 
@@ -3630,7 +3634,9 @@ void canvas_motion(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
         canvas_displaceselection(x, 
             xpos - x->gl_editor->e_xwas, ypos - x->gl_editor->e_ywas);
         x->gl_editor->e_xwas = xpos;
-        x->gl_editor->e_ywas = ypos;   
+        x->gl_editor->e_ywas = ypos;
+		//sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
+		//sys_vgui("pdtk_check_scroll_on_motion .x%lx.c 20\n", x);  
     }
     else if (x->gl_editor->e_onmotion == MA_REGION)
         canvas_doregion(x, xpos, ypos, 0);
diff --git a/src/pd.tk b/src/pd.tk
index 15501e5b06aab7d9d1a0ab77be536591de01c850..8818fb59c00304ec19657d410de970823618f187 100644
--- a/src/pd.tk
+++ b/src/pd.tk
@@ -3815,6 +3815,34 @@ proc pdtk_canvas_scroll {canvas xy distance} {
 	}
 }
 
+proc pdtk_check_scroll_on_motion {w threshold} {
+	set x1 [$w canvasx 0]
+	set x2 [expr [$w canvasx 0] + [winfo width $w]]
+	set y1 [$w canvasy 0]
+	set y2 [expr [$w canvasy 0] + [winfo height $w]]
+    set xpointer [expr [$w canvasx 0] + [winfo pointerx $w]-[winfo rootx $w]]
+    set ypointer [expr [$w canvasy 0] + [winfo pointery $w]-[winfo rooty $w]]
+
+	#puts stderr "pdtk_boo x1=$x1 x2=$x2 y1=$y1 y2=$y2 xp=$xpointer yp=$ypointer"
+
+	if { $::xscrollable([winfo parent $w]) == 1 } {
+		if { $xpointer > [expr $x2 + $threshold] } {
+			pdtk_canvas_scroll $w x 1
+		}
+		if { $xpointer < [expr $x1 - $threshold] } {
+			pdtk_canvas_scroll $w x -1
+		}
+	}
+	if { $::yscrollable([winfo parent $w]) == 1 } {
+		if { $ypointer > [expr $y2 + $threshold] } {
+			pdtk_canvas_scroll $w y 1
+		}
+		if { $ypointer < [expr $y1 - $threshold] } {
+			pdtk_canvas_scroll $w y -1
+		}
+	}
+}
+
 proc pdtk_canvas_motion {name x y mods} {
 	global pointer_x_local pointer_y_local pointer_x_global pointer_y_global tooltip_visible
 	set pointer_x_local $x