On Jan 9, 6:28 am, James Wilson <[email protected]> wrote: > I'm afraid that there isn't a way to do this at the moment. But there > will be very soon. Edward's current work on keybindings (see the > "design notes about key bindings" thread) will fix it.
I've just finished the prototype for this using @button nodes: @button up import PyQt4.QtGui as QtGui w = c.frame.body.bodyCtrl.widget w.moveCursor(QtGui.QTextCursor.Up) c.bodyWantsFocusNow() @button up-extend-selection import PyQt4.QtGui as QtGui w = c.frame.body.bodyCtrl.widget w.moveCursor(QtGui.QTextCursor.Up,QtGui.QTextCursor.KeepAnchor) c.bodyWantsFocusNow() @button up-page-extend-selection import PyQt4.QtGui as QtGui w = c.frame.body.bodyCtrl.widget cursor = w.textCursor() cursor.movePosition(QtGui.QTextCursor.Up,QtGui.QTextCursor.KeepAnchor, 15) # 15 lines/page w.setTextCursor(cursor) c.bodyWantsFocusNow() and similarly for cursor down, cursor to start/end of buffer, etc. Happily, these work properly on tests of very long lines with either @wrap or @nowrap in effect. Thus, the plan of having a gui-dependent helper for Leo's cursor- movement commands will certainly work. I'll fix the bugs mentioned in the other thread later today, but now it's time to watch some English football :-) Edward
-- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
