File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,11 @@ function Files.filenames()
98
98
end
99
99
100
100
--- @param file string
101
- --- @param refresh boolean
102
101
--- @return File
103
- function Files .get (file , refresh )
102
+ function Files .get (file )
104
103
local f = Files .orgfiles [file ]
105
104
if f then
106
- if refresh then
107
- Files ._set_loaded_file (file , f :refresh ())
108
- end
105
+ Files ._set_loaded_file (file , f :refresh ())
109
106
return Files .orgfiles [file ]
110
107
end
111
108
return nil
@@ -123,7 +120,7 @@ function Files.get_current_file()
123
120
if has_capture_var and is_capture then
124
121
return File .from_content (vim .api .nvim_buf_get_lines (0 , 0 , - 1 , false ))
125
122
end
126
- return Files .get (name , true )
123
+ return Files .get (name )
127
124
end
128
125
129
126
--- @param title string
@@ -245,7 +242,7 @@ function Files.get_headline_by_id(id)
245
242
if # parts ~= 2 then
246
243
return nil
247
244
end
248
- local file = Files .get (parts [1 ], true )
245
+ local file = Files .get (parts [1 ])
249
246
if file then
250
247
return file :get_closest_headline (tonumber (parts [2 ]))
251
248
end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ local Files = require('orgmode.parser.files')
2
2
local function load_file (path )
3
3
vim .cmd (string.format (' e %s' , path ))
4
4
vim .wait (5000 , function ()
5
- return Files .get (path , true ) ~= nil
5
+ return Files .get (path ) ~= nil
6
6
end , 5 )
7
7
vim .cmd (string.format (' e %s' , path ))
8
8
return path
You can’t perform that action at this time.
0 commit comments