tinkerwellapp / drivers

All available Tinkerwell drivers
https://tinkerwell.app
MIT License
84 stars 34 forks source link

SetCode `insert` method #17

Closed mikeerickson closed 4 years ago

mikeerickson commented 4 years ago

In reviewing the SetCode class methods, I only see the ability to create code, which overwrites the entire code area. Is there the ability to insert code at the current cursor position?

Example

SetCode::insert("codeToAdd");

Or further, get the highlighted code and replace with new code

SetCode::replace("codeToReplace");
musa11971 commented 4 years ago

Duplicate of: https://github.com/tinkerwellapp/drivers/issues/11

@mpociot Any information on this? 😃

mpociot commented 4 years ago

That's currently not possible, but meanwhile I added a new RunCode context-menu entry, which will not display the code but evaluate it immediately. So it will not modify the input text area.