OT Komodo Edit, line selection gutter is one pixel wide?
Eric Promislow
eric.promislow at gmail.com
Mon Jul 5 14:01:52 EDT 2010
On Jul 1, 9:39 am, John Doe <j... at usenetlove.invalid> wrote:
> Is there a way to increase the line selection gutter width? It
> seems to be only one pixel wide. In other words... When I single
> click on the left side of the line, in order to automatically
> select the line, the pointer must be in a precise single pixel
> location immediately to the left of the line. Or am I doing
> something wrong?
>
> Thanks.
>
> By the way... I can see that clicking and dragging to select
> multiple lines can be done somewhere in the space of the first
> character on the lines, but I am talking about single clicking to
> select the single line.
You can easily do this with a Komodo macro. First you get a reference
to the current buffer like so. In JS:
var view = ko.views.manager.currentView;
var scimoz = view.scimoz; // the editor
In Python code:
currentView = components.classes["@activestate.com/koViewService;1"].\
getService(Components.interfaces.koIViewService).currentView
view =
currentView.QueryInterface(Components.interfaces.koIScintillaView)
scimoz = view.scimoz
To get the current width of the line-selection margin:
oldValue = scimoz.getMarginWidth(2) # Margin #2, width given in
pixels
To set a new value:
scimoz.setMarginWidth(2, newValue) # 4 looks like a good value
There is no boundary between the breakpoint margin (1) and the line-
selection
margin.
If you want this behaviour in general, you can write a post-file-open
macro that
will set the margin after a file is opened. You currently can't write
a post-file-open trigger in Python, (see bug http://bugs.activestate.com/show_bug.cgi?id=45265)
Hope this helps,
Eric Promislow
Komodo Team Member
More information about the Python-list
mailing list