rjkroege / edwood

Go version of Plan9 Acme Editor
Other
387 stars 34 forks source link

Implement OEB in terms of file.Buffer #428

Closed rjkroege closed 2 years ago

rjkroege commented 2 years ago

Previous changes have added a newer alternative to file.File: file.Buffer that provides a more efficient backing storage mechanism for textual data with undo. This CL adds an adapter that implements ObservableEditableBuffer in terms of file.Buffer. Noteworthy changes:

Provides the core of #97 -- a more idiomatic text buffer implementation.

codecov[bot] commented 2 years ago

Codecov Report

Merging #428 (257d989) into master (a787c7b) will increase coverage by 0.32%. The diff coverage is 78.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #428      +/-   ##
==========================================
+ Coverage   56.64%   56.97%   +0.32%     
==========================================
  Files          56       56              
  Lines       10670    10781     +111     
==========================================
+ Hits         6044     6142      +98     
- Misses       4189     4199      +10     
- Partials      437      440       +3     
Impacted Files Coverage Δ
text.go 49.12% <ø> (ø)
file/buffer_adapter.go 56.06% <54.68%> (+6.06%) :arrow_up:
file/undo.go 88.59% <91.42%> (+3.44%) :arrow_up:
file/observable_editable_buffer.go 75.25% <94.11%> (+3.82%) :arrow_up:
file/file.go 86.00% <100.00%> (+1.43%) :arrow_up:
file/rune_array.go 53.33% <0.00%> (+3.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a787c7b...257d989. Read the comment docs.