update monaco model and antedit

This commit is contained in:
DanyLE
2022-06-03 19:30:11 +02:00
parent 6440635959
commit 9b4dddec87
222 changed files with 6825 additions and 19404 deletions

View File

@ -239,7 +239,7 @@ namespace OS {
*/
getEditorStatus(): GenericObject<any> {
const pos = this.editor.getPosition();
const mode = MonacoEditorModel.modes[this.editor.getModel().getModeId()];
const mode = MonacoEditorModel.modes[this.editor.getModel().getLanguageId()];
return {
row: pos.lineNumber,
column: pos.column,

View File

@ -455,7 +455,11 @@ namespace OS {
this.bindKey("ALT-W", () => this.menuAction("saveas"));
this.fileview.ondragndrop = (e) => {
const src = e.data.from.data.path.asFileHandle();
if(!e.data.from || !e.data.to)
{
return;
}
const src = e.data.from[0].data.path.asFileHandle();
const des = e.data.to.data.path;
return src
.move(`${des}/${src.basename}`)
@ -465,12 +469,12 @@ namespace OS {
if (p1.length < p2.length) {
e.data.to.update(p1);
(e.data
.from as GUI.tag.TreeViewTag).parent.update(
.from[0] as GUI.tag.TreeViewTag).parent.update(
p2
);
} else {
(e.data
.from as GUI.tag.TreeViewTag).parent.update(
.from[0] as GUI.tag.TreeViewTag).parent.update(
p2
);
e.data.to.update(p1);