-
Renzo Olivares authored
* attempt to extend to paragraph * second attempt * clean up implementation * clean up * updates * updates * Fix implementation * remove old * update docs * update docs * fix analyzer * Fix bug where new line character was selected and backwards selection failed * remove print * Add test for paragraph boundary * Add text editing test for extending selection to paragraph for mac and ios * rename to ExtendSelectionToParagraphBoundaryIntent * fix analyzer * Should default to downstream when collapsing selection * get rid of _getParagraphAtOffset and move into getTextBoundaryAt * Search for all line terminators * iterate through code units instead of characters * Address some reviewer comments" * Add separate implementations for leading and trailing paragraph boundary methods * Do not break after a carriage return if it is followed by a line feed * test carriage return followed by a line feed * more tests * Do not continue if the line terminator is at the target text offset * add hack to extend highlight to line terminator * Revert "add hack to extend highlight to line terminator" This reverts commit b4d3c434539b66c3c81c215e87c645b425902825. * Revert "Do not continue if the line terminator is at the target text offset" This reverts commit 789e1b838e54e7c25600bfa8852e59431ccaf5dc. * Update ParagraphBoundary with latest TextBoundary changes * Update implementation to iterate through indexes * update getTrailingTextBoundaryAt to include the line terminator * Updates * more updates * more updates * updates * updates * Lets try this again * clean up * updates * more updates * updates * fix * Re-implement using custom paragraph boundary applying method * Revert "Re-implement using custom paragraph boundary applying method" This reverts commit cd2f7f4b6eb6726b28f82a43708812e06a49df95. * Revert "fix" This reverts commit 8ec1f8f58935cfb3eb86dc6afd2894537af4cf7b. * updates * Revert "updates" This reverts commit 9dcca4a0031fe18ada9d6ffbbe77ba09918e82ae. * Revert "Revert "fix"" This reverts commit 9cc1332cd3041badc472d0d223a106203e46afb8. * Revert "Revert "Re-implement using custom paragraph boundary applying method"" This reverts commit 1acb606fb743fd840da20cca26d9a7c26accb71d. * Fix paragraph boundaries * Add failing test * Address some comments * group tests and fix analyzer * fix typo * fix remaining test * updates * more fixes and logs * clean up and add another test * Fix last test * Add new test * Clean up * more clean up * clean up comments * address comments * updates * return null when position is out of bounds and 0 or end of text if appropriate * Clean up cases * Do not return null when OOB in the direction of iteration * clean up * simplify implementation thanks to LongCatIsLooong feedback * Address comments * Add line and paragraph separator * Use _moveBeyondTextBoundary instead of custom _moveToParagraphBoundary * Change some intent names and revert fromPosition change * clean up docs --------- Co-authored-by: Renzo Olivares <roliv@google.com>