def pos2pos(col_or_smb, row, how): ''' Params how 'col2smb' 'smb2col' ''' pass; LOG and log('col_or_smb, row, how={}', (col_or_smb, row, how)) return (ed.convert( app.CONVERT_CHAR_TO_COL, col_or_smb, row)[0] if how=='smb2col' else ed.convert( app.CONVERT_COL_TO_CHAR, col_or_smb, row)[0] )
def _move_caret_down(cCrtSmb, rCrt, ed_=ed, id_crt=app.CARET_SET_ONE): ''' Caret will be moved to next line with save start column (if next line exists) Params cCrtSmb Start pos as symbol number rCrt Start line ed_ Editor id_crt CARET_SET_ONE or CARET_SET_INDEX+N for caret with index N ''' pass; #LOG and log('cCrtSmb, rCrt, id_crt==app.CARET_SET_ONE={}',(cCrtSmb, rCrt, id_crt==app.CARET_SET_ONE)) if (rCrt+1)>=ed_.get_line_count(): return colCrt = ed.convert(app.CONVERT_CHAR_TO_COL, cCrtSmb, rCrt )[0] cCrtSmb1= ed.convert(app.CONVERT_COL_TO_CHAR, colCrt, rCrt+1)[0] ed_.set_caret(cCrtSmb1, rCrt+1, id=id_crt)