what is getCursor().ch?

Hi! I have an old snippet that uses getCursor

 const cursor = editor.getCursor();
 const currentLine = editor.getLine(cursor.line); // Current row

 let start = cursor.ch;
 let end = start;

What would be the equivalent of that in v6? I see from the migration doc, getCursor is equivalent to cm.state.selection.main.head. However, what is ch in v5? is it correct to say that cm.state.selection.main.head is just getCursor().ch and the getCursor().line is just cursor + 1? thanks!

pos.ch is the offset into the line indicated by pos.line. So in 6.x this would be pos - doc.line(pos).from