Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/file_shell/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/junkfix/file-shell/issues",
"requirements": [],
"version": "1.2.0"
"version": "1.2.1"
}
2 changes: 1 addition & 1 deletion custom_components/file_shell/www/codemirror.min.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions custom_components/file_shell/www/file_shell.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function () {
"use strict";

console.log("File Shell 1.2.0");
console.log("File Shell 1.2.1");
const _id = (id) => document.getElementById(id);
const _qsa = (q, el) => Array.from((el || document).querySelectorAll(q));
const _qs = (q, el) => (el || document).querySelector(q);
Expand Down Expand Up @@ -725,7 +725,6 @@ function Draft(path, d=false) {
}
return localSet(k, d);
}

async function openTextFile(e) {
const path = fixpath(e.path);
hideMenu();
Expand Down Expand Up @@ -760,13 +759,17 @@ async function openTextFile(e) {


const fileExt = getExt(path);
const goToLine=v=>{let l=+prompt("Go to Line:");return l>0&&l<=v.state.doc.lines?(v.dispatch({selection:{anchor:v.state.doc.line(l).from},userEvent:"select"}),1):0};

tabs.x[path].cm = CM.EditorState.create({
doc: text,
extensions: [
CM.basicSetup,
CM.keymap.of([CM.indentWithTab]),
CM.search(),
CM.Prec.high(CM.keymap.of([
{key: "Ctrl-g", run: goToLine, preventDefault: true},
{key: "Cmd-g", run: goToLine, preventDefault: true},
])),
CM.autocompletion(),
CM.EditorState.languageData.of(() => [{autocomplete: entityCompletion}]),
edit.theme.of(app.dark ? CM.darkTheme : CM.lightTheme),
Expand Down
Loading