Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit ecb49ea

Browse files
committed
Retain the TextBuffer within a PatchBuffer
1 parent 5b35a4f commit ecb49ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/models/patch/patch-buffer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const LAYER_NAMES = ['unchanged', 'addition', 'deletion', 'nonewline', 'hunk', '
66
export default class PatchBuffer {
77
constructor() {
88
this.buffer = new TextBuffer();
9+
this.buffer.retain();
10+
911
this.layers = LAYER_NAMES.reduce((map, layerName) => {
1012
map[layerName] = this.buffer.addMarkerLayer();
1113
return map;

0 commit comments

Comments
 (0)