> It is. If I understand correctly the original reason for this is because > when you set the scintilla buffer (at least as it goes currently), it > pushes the cursor to the end of the inserted text, and so it needs to be > pushed back to the start by default (if no other position is stored or > specified). Please excuse if I'm mistaken here.
Geany with my patch behaves normally without unnecessary goto_pos. But today I added more clear-looking patch that skips goto-ing if pos == current_pos. Isn't? Try, it will take 2 minutes: void sci_goto_pos(ScintillaObject *sci, gint pos, gboolean unfold) { if (unfold) SSM(sci, SCI_ENSUREVISIBLE, (uptr_t) SSM(sci, SCI_LINEFROMPOSITION, (uptr_t) pos, 0), 0); /* Do not goto if we are already here */ if(pos == sci_get_current_position(sci)) return; SSM(sci, SCI_GOTOPOS, (uptr_t) pos, 0); } -- Best regards, Pavel Roschin aka RPG _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel