If I call this before showing the file dialog:
const auto line = m_edit.GetFirstVisibleLine();
const auto pos = m_edit.GetCurrentPos();
And then at the end, wther they click OK or cancel to that dialog, I call:
m_edit.SetFirstVisibleLine(line);
m_edit.SetCurrentPos(pos);
m_edit.ClearSelections();
It works. Position stays the file, nothing selected. But the caret is right at the start of the document.
If I swap the lines:
m_edit.SetFirstVisibleLine(line);
m_edit.ClearSelections();
m_edit.SetCurrentPos(pos);
The caret ends up at the right place, but now everything is selected from the start of the document to the caret.
I can't win.
Is there no way to get the editor to temporarily stop doing anything ?
Tried SetRedraw with false and true and it didn't quite work.