On 15-10-09 04:43 PM, Matthew Brush wrote:
On 15-10-09 03:42 PM, Pengfei Sun wrote:
[...] Do you have any further suggestions for my case?


I made a quick and dirty patch that will log on the terminal wherever in (virtual) memory the buffer is stored, whenever it moves, per-file. See attachment.

Cheers,
Matthew Brush

diff --git a/src/editor.c b/src/editor.c
index 1336588..840e979 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -1075,6 +1075,23 @@ static gboolean on_editor_notify(G_GNUC_UNUSED GObject *object, GeanyEditor *edi
 			if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT))
 			{
 				document_update_tag_list_in_idle(doc);
+
+/* Tracking Scintilla buffer in memory */
+{
+	static const gchar *old_start = NULL;
+	static const gchar *old_end = NULL;
+	const gchar *start =
+		(const gchar *) scintilla_send_message(sci, SCI_GETCHARACTERPOINTER, 0, 0);
+	gsize len = scintilla_send_message(sci, SCI_GETTEXTLENGTH, 0, 0);
+	const gchar *end = start + len;
+	if (start != old_start || end != old_end)
+	{
+		g_print("** The buffer for file '%s' is at %p:%p\n", doc->real_path, start, end);
+		old_start = start;
+		old_end = end;
+	}
+}
+
 			}
 			break;
 
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to