johnfactotum/gedit-restore-minimap

Map tab width

alok1111 opened this issue · 2 comments

Hi and thank you for the plugin!

Is there a way to increase width of the map? The lines length of my files is so that sometimes I don't see line endings on the map.

Try this patch:

diff --git a/restore_minimap.py b/restore_minimap.py
index 9d10848..9a57f3e 100644
--- a/restore_minimap.py
+++ b/restore_minimap.py
@@ -80,7 +80,7 @@ class RestoreMinimapPlugin(GObject.Object, Gedit.ViewActivatable):
         self.scrolled = self.view.get_parent()
         self.scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.EXTERNAL)
 
-        self.source_map = GtkSource.Map()
+        self.source_map = GtkSource.Map(width_request = 150)
         self.source_map.set_view(self.view)
         self.source_map.set_property('font-desc', Pango.FontDescription('BuilderBlocks 1'))
         self.source_map.show()

This will set the width to 150px.

It works, thanks.