Show More
@@ -869,7 +869,7 b' def position_to_cursor(text:str, offset:int)->Tuple[int, int]:' | |||
|
869 | 869 | |
|
870 | 870 | """ |
|
871 | 871 | |
|
872 | assert 0 < offset <= len(text) , "0 < %s <= %s" % (offset , len(text)) | |
|
872 | assert 0 <= offset <= len(text) , "0 <= %s <= %s" % (offset , len(text)) | |
|
873 | 873 | |
|
874 | 874 | before = text[:offset] |
|
875 | 875 | blines = before.split('\n') # ! splitnes trim trailing \n |
General Comments 0
You need to be logged in to leave comments.
Login now