about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-22 23:33:46 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-22 23:33:46 -0700
commit65d39de62c39da5183b0eade69317c9cd8051ec4 (patch)
treef5c3c971c96963f8c5b5842d660959be08288209
parent12f93e4af09f081927ea9734c49324598020c566 (diff)
downloadmu-65d39de62c39da5183b0eade69317c9cd8051ec4.tar.gz
1428 - second attempt
This doesn't work either; some children are collapsed but not others
(after the first expanded child).
-rw-r--r--077trace_browser.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/077trace_browser.cc b/077trace_browser.cc
index dd89eebf..a4a201ce 100644
--- a/077trace_browser.cc
+++ b/077trace_browser.cc
@@ -109,20 +109,17 @@ void start_trace_browser() {
       refresh_screen_rows();
     }
     if (key == TB_KEY_BACKSPACE || key == TB_KEY_BACKSPACE2) {
-//?       tb_shutdown();
       assert(Trace_index.find(Display_row) != Trace_index.end());
       long long int start_index = Trace_index[Display_row];
       long long int index = 0;
       // simultaneously compute end_index and max_depth
       // (until the first time a line has lower depth than its predecessor)
       int max_depth = 0;
-      int initial_depth = Trace_stream->past_lines.at(start_index).depth;
       for (index = start_index+1; index < SIZE(Trace_stream->past_lines); ++index) {
         if (Visible.find(index) == Visible.end()) continue;
         trace_line& curr_line = Trace_stream->past_lines.at(index);
         if (curr_line.depth == 0) continue;
-        if (curr_line.depth < initial_depth) break;
-        if (max_depth == 0) max_depth = curr_line.depth;
+        if (curr_line.depth > max_depth) max_depth = curr_line.depth;
         if (curr_line.depth < max_depth) break;
       }
       long long int end_index = index;
9 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259