This represents the newly entered data for each keystroke. This is often a single added character, but for cases like pasting text it can be more complex. The PDF API reference doesn't specify any algorithm to use. The algorithm used here works by iterating through both strings from the start until the first different character is encountered. Then the rest of the new text is considered the difference. This doesn't produce the theoretically optimal/minimal diff, but seems to work well enough for practical application. When text is removed the diff is emptyremotes/origin/work/numberformattest
parent
69a2cc144f
commit
80afe26873
8 changed files with 101 additions and 2 deletions
Loading…
Reference in new issue