summaryrefslogtreecommitdiff
path: root/src/static/js/Changeset.js
AgeCommit message (Collapse)Author
2015-11-10Protects against a null atext in cloneATextFrancois Cassin
2015-05-05When using setText(), replace the entire existing text of the pad,Xavid
rather than replacing all except the last letter.
2015-02-16throw in applyToText and not in applyToATextwebzwo0i
2015-02-16add semicolonswebzwo0i
2015-02-15we do not have the text/padid, but at least we can print the changesetwebzwo0i
2015-02-15print the actual text...webzwo0i
2015-02-15string concat, not multiple arguments...webzwo0i
2015-02-15better error messagewebzwo0i
2015-02-15remove unnecessary code; because we have checks in every op now we don'twebzwo0i
need this anymore
2015-02-15add newline counting for - and + opwebzwo0i
2015-02-15off by 1webzwo0i
2015-02-15add a comment to make clear that the string in stringIteratorwebzwo0i
does not change; only curIndex is increased. Newlines are counted between curIndex and the end of string.
2015-02-14totally wrong, introduced by myself inwebzwo0i
3354b9406b94e1a04b5eee1c0152914dde73ba89 the first part is always false so the second part which is always true in case a cs deleted some lines was never triggered...sigh
2014-12-27op is ok, if it doesnt include newlines. op is ok, if op.lines is equal to ↵webzwo0i
newlines in op.chars
2014-12-27check if op.lines is in sync with atext-newlineswebzwo0i
Conflicts: src/static/js/Changeset.js
2014-12-27make stringIterator aware of newlineswebzwo0i
2014-12-27Revert "be more strict in checkRep"webzwo0i
This reverts commit 22803da42f4f8c6aeccc15d0a916bae6332a8652.
2014-12-04be more strict in checkRepwebzwo0i
2014-12-04dont remove more lines than exist in the whole textwebzwo0i
2014-02-20fix for infinite loop on bad changesetDmitry Uvarov
2013-12-08[Changeset] a?lines_length was not used within inverse functionwebzwo0i
2013-12-05Replace tabs indentation with spaces indentationLuc Didry
Some files are obviously external libraries, I didn't touch them
2013-10-10Merge pull request #1926 from ether/fix/no-connect-to-corrupt-padMarcel Klehr
Fix a whole range of bugs related to corrupted changesets
2013-10-10Polish the error messages of the easysync libMarcel Klehr
2013-10-10Easysync: Throw an error if an unknown attrib is refernecedMarcel Klehr
2013-04-24Issue #1625: Fix to client-side-induced changeset spamming.Brian Emerick
THE BUG - HIGH LEVEL: - When client A sends out an attribute change, client B applies that change to itself but also thinks that it made the change itself, which is incorrect. This means that when client B next makes a change, he will send out that he made the attrib change that A actually made. - Ex: Have 2 clients on the same pad. Have A apply bold on some text. Next, have B type a character. B will broadcast that it both added a character AND applied bold, when in reality it did NOT apply bold at all, that change was done by the other client and this client incorrectly adopted it as its own. - This root bug behavior results in clients continuing to think that they each made the other client's change, thus resulting in an infinite loop of changeset spamming that bogs down clients and harms server stability. THE BUG - IN DEPTH: - The root issue is in the way that Changesets are combined in Changeset.follow(). Specifically, in the case of a changeset with ONLY new attrib changes (no text changes) being merged with an identity changeset (has no ops). - In this case, Changeset.follow() copies the ops of the new CS and fully overrides the other CS. - applyChangesToBase invokes Changeset.follow to determine the final client document CS state after applying the new CS. If the final client document CS state is NOT the identity CS, then the client broadcasts that it made a change. - When client A changes just attribs, client B's applyChangesToBase calls Changeset.follow() and passes client A's changeset (attrib change) and Client B's current changeset state (identity). - As per the noted bug, Changeset.follow() returns client A's changeset as a result, causing client B to adopt client A's changeset as its own document state. Thus, client A ends up thinking it has made client B's changes. THE FIX: - Changeset.follow() should NOT copy the ops of the new CS passed in if those changes are only attrib changes. This allows applyChangesToBase to properly set the client's CS back to the identity after applying an external attrib change, instead of incorrectly adopting the external client's changes.
2013-04-15undo avoid changeset spam as it breaks functionalityJohn McLear
2013-04-08some polish for a turdJohn McLear
2013-04-08temp patch for 1652John McLear
2013-01-27Added missing functions to create pad diffsPeter 'Pita' Martischka
2012-07-08remove unused _opt in favor of code size/readabilityMatthias Bartelmeß
2012-03-18replaceing AttributePoolFactory by AttributePoolMatthias Bartelmeß
2012-03-10Merge branch 'require-paths' into pluginChad Weider
Conflicts: node/server.js src/static/js/Changeset.js src/static/js/ace.js src/static/js/ace2_common.js src/static/js/ace2_inner.js src/static/js/broadcast.js src/static/js/changesettracker.js src/static/js/chat.js src/static/js/collab_client.js src/static/js/contentcollector.js src/static/js/domline.js src/static/js/linestylefilter.js src/static/js/pad.js src/static/js/pad_connectionstatus.js src/static/js/pad_docbar.js src/static/js/pad_editbar.js src/static/js/pad_editor.js src/static/js/pad_impexp.js src/static/js/pad_modals.js src/static/js/pad_savedrevs.js src/static/js/pad_userlist.js src/static/js/pad_utils.js src/static/js/timeslider.js src/static/js/undomodule.js src/static/pad.html src/static/timeslider.html
2012-03-02Merge branch 'pita'Egil Moeller
Resolved conflicts: .gitignore src/static/js/ace.js src/static/js/ace2_inner.js src/static/js/broadcast.js src/static/js/domline.js src/static/pad.html src/static/timeslider.html Ignored conflicts (please merge manually later): node/server.js src/node/utils/Minify.js
2012-02-26First stab at getting client side require(plugin/..) to work from within ↵Egil Moeller
etherpad
2012-02-26The Big Renaming - etherpad is now an NPM moduleEgil Moeller