gedit-source-code-browser
gedit-source-code-browser copied to clipboard
'Document' object has no attribute 'goto_line' (Gedit 44.2)
Gedit Version: 44.2 Distro: Ubuntu 23.04
I experience the following error when clicking on an item in the source code browser panel:
Traceback (most recent call last):
File "/usr/lib/gedit/plugins/sourcecodebrowser/plugin.py", line 473, in on_tag_activated
document.goto_line(line)
^^^^^^^^^^^^^^^^^^
AttributeError: 'Document' object has no attribute 'goto_line'
This probably has something to do with:
gedit now depends on libgedit-gtksourceview instead of GtkSourceView
fix available: https://github.com/MicahCarrick/gedit-source-code-browser/issues/39#issuecomment-1529733276
This did not work for me on Gedit Version 44.2 in Ubuntu 23.10.
Any ideas on what I could do differently?
I tried applying the fix by adding import gi to plugin.py using the following command...
sudo sed -i "s|from . import ctags|from . import ctags\nimport gi|g" /usr/lib/gedit/plugins/sourcecodebrowser/plugin.py
...which changes /usr/lib/gedit/plugins/sourcecodebrowser/plugin.py...
...from...
import os
import sys
import logging
import tempfile
from . import ctags
from gi.repository import GObject, GdkPixbuf, Gedit, Gtk, PeasGtk, Gio
...to...
import os
import sys
import logging
import tempfile
from . import ctags
import gi
from gi.repository import GObject, GdkPixbuf, Gedit, Gtk, PeasGtk, Gio
...but I still get the same error.