How to know if `selectAll` is triggered

I’m changing the cursor after setting the value…

const current_pos = codeEditor.getCursor();

But this doesn’t work when we use Ctrl + A, the cursor position is changed resulting in weird behavior.

I just want to detect if selectAll is triggered so that I don’t setCursor in that case.

if (codeEditor.somethingSelected()) return;

Saved the day. :grinning: