gedit-intelligent-text-completion icon indicating copy to clipboard operation
gedit-intelligent-text-completion copied to clipboard

Destructive side-effect on GeditDocument.get_text()

Open addiks opened this issue 10 years ago • 0 comments

Hello,

i am developing a python plugin for gedit (3.10.4). In that plugin i hook to the event 'changed' on the GeditDocument. In that event i try to get the current contents of the document using "document.get_text(start, end, False)".

When i have no other plugins active i get the correct content of the document. When this plugin (gedit-intelligent-text-completion) is active, i get weird results when creating newlines after '{' signs. For better domenstration i have recorded what is happening and attached it as a gif to this issue. Notice how lines 2 and 3 merges in the return of 'GeditDocument.get_text()'.

2015-01-10 gedit-itc-bug

This behaviour conflicts with my plugin and potentially with other plugins that try to fetch the document-content when it's changes.

addiks avatar Jan 10 '15 19:01 addiks