sourceview: Add marks to an unloaded document the same way we reload marks.
commitf34ac5553ff3ad8b49e252891833f3844dead12b
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
Thu, 3 Jan 2013 20:01:17 +0000 (3 21:01 +0100)
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
Thu, 3 Jan 2013 20:01:46 +0000 (3 21:01 +0100)
tree2f862a1ef387195dfefde4ad0a6fe3024646dc7b
parent5685ff7729faa31f60b47ab371cfbb44dbe17b33
sourceview: Add marks to an unloaded document the same way we reload marks.

Instead of using a lot of idle sources we can instead use the existing code for reloading marks
to add the new mark when the document is loaded. This fixes a problem where the added
idles would starve all other mainloop sources with a lower priority than
G_PRIORITY_DEFAULT_IDLE.

For example this would cause the loading of documents to completely fail when using GLib
from git since the async read in sourceview-io.c uses G_PRIORITY_LOW. Previous versions
of GLib would complete the asynchronous task using an idle with G_PRIORITY_DEFAULT
regardless of the passed in priority. GLib from git instead completes the task using a idle
with the passed in priority so the idle sources for adding marks now starves the completion of
the asynchronous read.

https://bugzilla.gnome.org/show_bug.cgi?id=691090
plugins/sourceview/sourceview-private.h
plugins/sourceview/sourceview.c