diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-25 00:02:34 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-25 00:02:34 (EDT) |
commit | 9247ac5315621731adb2433d0ad002f426659e8b (patch) | |
tree | 260083d605bfbe049389cdcb37532a93f7cb51d0 | |
parent | 89fd1a17e9d3ccc67ba1a395eb0882bdce242893 (diff) | |
download | marquee-9247ac5315621731adb2433d0ad002f426659e8b.zip marquee-9247ac5315621731adb2433d0ad002f426659e8b.tar.gz marquee-9247ac5315621731adb2433d0ad002f426659e8b.tar.bz2 |
MqTab: Fix positions of appended children
-rw-r--r-- | src/tab.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -74,11 +74,12 @@ append_child(MqTab *new_node, MqTab *parent) new_node->next = NULL; new_node->prev = parent->last_child; /* May be NULL */ new_node->first_child = new_node->last_child = NULL; - new_node->position = parent->position; /* Will be updated */ new_node->tree_size = 0; /* Will be updated */ if (parent->last_child) { + new_node->position = parent->last_child->position; parent->last_child->next = new_node; } else { + new_node->position = parent->position; parent->first_child = new_node; } parent->last_child = new_node; |