add review begin of line command

This commit is contained in:
chrys
2016-10-02 14:19:22 +02:00
parent 9e6dc32241
commit 41fe26d7a3
7 changed files with 13 additions and 17 deletions

View File

@ -19,10 +19,7 @@ class command():
def run(self):
# Prefer review cursor over text cursor
if self.env['screenData']['newCursorReview']:
cursorPos = self.env['screenData']['newCursorReview'].copy()
else:
cursorPos = self.env['screenData']['newCursor'].copy()
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
textAfterCursor = mark_utils.getTextAfterMark(cursorPos, self.env['screenData']['newContentText'])

View File

@ -49,10 +49,6 @@ class cursorManager():
if not self.env['screenData']['newCursorReview']:
self.env['screenData']['newCursorReview'] = self.env['screenData']['newCursor'].copy()
def setReviewCursorPosition(self, x, y):
if not x:
return
if not y:
return
if not self.isReviewMode():
self.enterReviewModeCurrTextCursor()
self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview']

View File

@ -56,4 +56,4 @@ def getTextAfterMark(mark, inText):
return ''
if mark == None:
return ''
return getTextBetweenMarks(mark, {'x':len(inText[0])-1,'y':len(inText)-1}, inText)
return getTextBetweenMarks(mark, {'x':len(inText[0]),'y':len(inText)}, inText)