From 6ed60848a4d2bca5a2c64e18d58671d973ee6479 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 15 Sep 2023 13:33:26 -0700 Subject: delete some dead code This is a holdover from the days of bifold text. --- commands.lua | 3 +-- log_browser.lua | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/commands.lua b/commands.lua index 512992d..4e891ef 100644 --- a/commands.lua +++ b/commands.lua @@ -129,8 +129,7 @@ end function navigate_to_file(s) move_candidate_to_front(s) - local candidate = guess_source(s..'.lua') - source.switch_to_file(candidate) + source.switch_to_file(s..'.lua') reset_file_navigator() end diff --git a/log_browser.lua b/log_browser.lua index 078db06..6432d85 100644 --- a/log_browser.lua +++ b/log_browser.lua @@ -35,7 +35,6 @@ function log_browser.parse(State) if rest then line.data = rest end - line.filename = guess_source(line.filename) line.line_number = tonumber(line.line_number) if line.data:sub(1,1) == '{' then local data = json.decode(line.data) @@ -75,15 +74,6 @@ function table.shallowcopy(x) return {unpack(x)} end -function guess_source(filename) - local possible_source = filename:gsub('%.lua$', '%.splua') - if file_exists(possible_source) then - return possible_source - else - return filename - end -end - function log_browser.draw(State, hide_cursor) assert(#State.lines == #State.line_cache) local mouse_line_index = log_browser.line_index(State, App.mouse_x(), App.mouse_y()) -- cgit 1.4.1-2-gfad0 ef='/akkartik/mu/tree/062rewrite_stash.cc?h=main&id=3dc3c72c4327f5f7cdeb28b1bb80cc8c67cb2c5b'>tree commit diff stats
path: root/062rewrite_stash.cc
blob: 68738341742916cb7d2854c05052deceb7e24fc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165