diff options
Diffstat (limited to 'core/File.zig')
| -rw-r--r-- | core/File.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/File.zig b/core/File.zig index 0c742eee..d36af5c2 100644 --- a/core/File.zig +++ b/core/File.zig @@ -1137,8 +1137,10 @@ fn edit(p: *Pardes, f: *State, off: usize, len: usize, bytes_in: []const u8, who } // The kept tree follows the edit (normal.fileTree parses with it), but // not while a rollback copy holds it: an edit in place would change the - // copy's tree under it, so that one is left as it is and parsed anew. - if (f.node_tree) |tree| if (syntax.held_trees == null and f.node_tree_edits == f.revision) { + // copy's tree under it, so that one is left as it is and parsed anew; + // nor with the `Changes` layer's lines in or going (the tree is of the + // file's text, the edit of the buffer's): parsed anew. + if (f.node_tree) |tree| if (syntax.held_trees == null and f.node_tree_edits == f.revision and told and f.read_only.len == 0) { syntax.editTree(tree, f.content[0..off], f.content[off..][0..len], bytes); f.node_tree_edits = f.revision +% 1; }; |
