#!/usr/bin/env python """emano.py - cutLine.py""" # @@ Actually this is more like conditionallyAppendiveCutLine... def cutLine(editor): y, x, q, p = editor.mainwin.position() editor.mainwin.startOfLine() editor.mainwin.selectFrom() editor.mainwin.endOfLine() moved = editor.mainwin.moveRight() editor.mainwin.updateSelection() if (hasattr(editor.doc, 'prevcommand') and editor.doc.prevcommand == ('cutLine', q)): editor.menu.cut(append=True) else: editor.menu.cut() editor.doc.prevcommand = ('cutLine', q) return moved if __name__=="__main__": main()