franzheidl / atom-applescript

Applescript language support for Atom
6 stars 4 forks source link

Cuts large scripts #13

Open elprohabro opened 4 years ago

elprohabro commented 4 years ago

Script with ~1000 lines is not opened properly. Only last ~226 lines of code are presented. After pressing cmd+Z few times I see that Atom cuts every ~200 lines and proceeds with the rest of the script.

elprohabro commented 4 years ago

Ok, I am absolute newbie both here on Github and in Atom. Discovered that the problem lies in setText method. Atom also provides insertText method

So I changed this line in decompiler: stdout.stdout.on 'data', (data) -> editor.setText data to: stdout.stdout.on 'data', (data) -> editor.insertText data

but it still had original compiled script in window, so i added editor.setText "" before stdout.

Looks like this solved the issue.

The problem is I have absolutely no idea what I'm doing, please correct me if there is a mistake.