diff options
author | pommicket <pommicket@gmail.com> | 2024-07-17 23:16:09 -0700 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2024-07-17 23:16:09 -0700 |
commit | 4d760a552b2c1143c1bd0a8b055b02892daab60e (patch) | |
tree | f4d67aff8757e6f25d972d5a480ff0f4667e6f4e /ted.c | |
parent | bf27c55563994a634b76b6f78afcf538a8b89839 (diff) |
Fix opening file from build output
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -620,10 +620,12 @@ static TextBuffer *ted_open_buffer(Ted *ted, u16 *tab) { // it may happen.... (currently happens for rename symbol) node = ted_buffer_location_in_node_tree(ted, ted->prev_active_buffer, NULL); } else { - // idk what is going on - ted_error(ted, "internal error: can't figure out where to put this buffer."); - ted_delete_buffer(ted, new_buffer); - return NULL; + // e.g. opening a file while build output buffer is active + // just guess a node where the buffer should go - + // this situation is pretty rare. + node = ted->nodes[0]; + while (node_child1(node)) + node = node_child1(node); } } |