ioBroker / ioBroker.javascript

Script engine for JavaScript and Blockly
MIT License
322 stars 120 forks source link

Cursor positions in different tabs affect each other #1321

Open derrapf opened 1 year ago

derrapf commented 1 year ago

Situation: Several Scripts are opend in the editor, shown as tabs. When you scroll in one script to a certain code line and you go back (selecting another tab) to antother script which you edited as well, then you will find yourself on another position here. That means that scrolling and placing the cursor in one script affects the scripts in the other tabs as well.

To Reproduce

  1. Open at least two scripts in the script editor
  2. Go to the first tab, place the cursor at a certain position in the script
  3. Go to antoher tab
  4. Place the cursor to any other position here
  5. Go back to the first tab
  6. Result: The cursor is somewhere else

Expected behavior
Cursor position should be stored per tab.

Versions:

Baenker commented 1 month ago

Bitte das Feature nicht ändern. Es verhält sich je nach Situation sehr sehr gut.

Für Yahka habe ich div. Scripte die alle identisch sind. Die synchronisieren die von mir angelegte Datenpunkte für yahka mit den entsprechenden Geräten bzw dessen Adapter.

Wenn man nun einen Fehler im Script A entdeckt und ergänzt in Zeile 200 eine Zeile kann man danach zu Script B wechseln und ist eben genau an der gleichen Stelle im Script bei der Zeile 200. Wenn man nun 10 solcher Scripte hat ist das extrem hilfreich.

Das macht es wirklich einfach viele ähnliche Scripte nach einander zu korrigieren.

Es ist natürlich weniger schön wenn ich in unterschiedlichen Scripten etwas ändere aber das kann man umgehen wenn man Script für Script bearbeitet…