fix: editor scroll not reset on file open
This commit is contained in:
parent
4aa97cc5d0
commit
239181bb64
@ -194,6 +194,7 @@ end
|
|||||||
function open_file_in_editor(filename, line, mutable)
|
function open_file_in_editor(filename, line, mutable)
|
||||||
local editor = document.editor
|
local editor = document.editor
|
||||||
local source = file.read(filename):gsub('\t', ' ')
|
local source = file.read(filename):gsub('\t', ' ')
|
||||||
|
editor.scroll = 0
|
||||||
editor.text = source
|
editor.text = source
|
||||||
editor.focused = true
|
editor.focused = true
|
||||||
if line then
|
if line then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user