- Aug 13, 2009
-
-
-
-
-
-
-
-
-
-
-
-
-
-
When a previous character needed to be found, it is simpler to move existing cursor rather than retravese the linked list to find the offset again.
-
-
Offsets are still used within the function, but this patch reduces the use of it at the entry to the function.
-
The function was used in one place, and was simply a wrapper around a call to ME_InsertRunAtCursor, so I removed it to avoids it use in other parts of the code.
-
-
-
-
Previously the function was only used to move a single character in either direction, so I made the function more general so that it could be used in more places.
-
-
-
-
-
-
Missed an assignment for end_run when the end cursor is provided and the end position doesn't cause a split.
-
-
-
- Aug 12, 2009
-
-
-
The test that succeeded from this change was as a result of allowing the end of the character format change be specified using NULL as the rest of the text. Before, the end paragraph run at the end of the text was not being set for this case, when all the text was supposed to have its character format changed.
-
Prevent extra conversions from character offset to ME_Cursor.
-
-
Plenty of places in the code find following or preceding runs, then afterwards find the paragraph from the run. This is inefficient because the same linked list is used for both runs and paragraphs, so changes in paragraphs can be detected while returning the next or previous run.
-
The code was previously getting the same text in the loop from the editor, and it was converting each of the prefixes to compare against for each URL candidate.
-
Before a single length was used for the number of characters to retrieve from the text, and to keep track of the size of the buffer. These are not equivalent, since there is a possible end of line conversion.
-
Previously the only convenient way to get the start and end of the selection was through offsets, which eventually need to get converted back into items in the linked list storing the text. The new function will help with eliminating these inefficiencies.
-
This function will make it easier to work with ME_Cursor objects, which should be used in a lot of places instead of character offsets (which often require seeking through the linked lists to perform operations with).
-
-
-
-