From a8e4ed4ac6ca24203c61f8ae83cc442b05f69ce5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 9 Apr 2018 16:33:28 -0700 Subject: [PATCH] Fixed bug with loading file contents. --- ldt.lua | 2 +- ldt.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ldt.lua b/ldt.lua index 26a0d53..9422b85 100644 --- a/ldt.lua +++ b/ldt.lua @@ -1188,7 +1188,7 @@ ldb = { pads.stack.on_select = function(self, stack_index) local filename, line_no = pads.stack.columns[2][stack_index]:match("^(.*):(%d*)$") line_no = tonumber(line_no) - show_src(filename, line_no, stack_sources[stack_index]) + show_src(filename, line_no, filename and file_cache[filename] or stack_sources[stack_index]) return show_vars(stack_index) end pads.stack:select(1) diff --git a/ldt.moon b/ldt.moon index fffc3ee..c88e643 100644 --- a/ldt.moon +++ b/ldt.moon @@ -783,7 +783,7 @@ ldb = { filename,line_no = pads.stack.columns[2][stack_index]\match("^(.*):(%d*)$") --filename, line_no = pads.stack.lines[stack_index]\match("[^|]*| ([^:]*):(%d*).*") line_no = tonumber(line_no) - show_src(filename, line_no, stack_sources[stack_index]) + show_src(filename, line_no, filename and file_cache[filename] or stack_sources[stack_index]) show_vars(stack_index) pads.stack\select(1)