diff options
| author | Nathan Dinsmore <nathan@users.noreply.github.com> | 2015-06-17 18:50:56 -0400 |
|---|---|---|
| committer | Nathan Dinsmore <nathan@users.noreply.github.com> | 2015-06-17 18:52:20 -0400 |
| commit | 1f52f4f1522c4bc7c24fb19ba66aeaff3bf15b64 (patch) | |
| tree | 948fc4be3fc7e89a9d0f403d936d838f21a53016 | |
| parent | 94687f8e630c5be6f2c82615c1aa1ec5cbee82b8 (diff) | |
| download | snap-1f52f4f1522c4bc7c24fb19ba66aeaff3bf15b64.tar.gz snap-1f52f4f1522c4bc7c24fb19ba66aeaff3bf15b64.zip | |
Optimize StringMorph::clearSelection()
This was taking a very large chunk of CPU time when copying large scripts.
| -rw-r--r-- | morphic.js | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -7402,6 +7402,7 @@ StringMorph.prototype.selectionStartSlot = function () { }; StringMorph.prototype.clearSelection = function () { + if (!this.currentlySelecting && this.startMark === 0 && this.endMark === 0) return; this.currentlySelecting = false; this.startMark = 0; this.endMark = 0; |
