Also the same pattern is used in cloud9 and probably in other places. Why you don't like breaking large deltas into smaller parts? We need something similar to handle readonly ranges too, see https://github.com/ajaxorg/ace/pull/1745#issuecomment-31600952