Just ran into this issue; here’s what’s happening and how it can be fixed.
(You can, of course, temporarily work around the problem by turning off “Line Wrap” under the “Editor” settings. But obviously that’s not a practical long term solution.)
Basically, the issue here is that in Obsidian’s default keymap for CodeMirror, the “End” key is bound to the goLineRight command, which is actually what you want for lines that might be wrapped (i.e. everything but tables).
So it needs to be replaced with a function that checks if the line is a table line and then executes goLineEnd instead of goLineRight. I added a proof-of-concept workaround to one of my in-progress plugins, like so:
this.register(around(CodeMirror.commands, {goLineRight(old) {
return function(cm) {
const handle = cm.getLineHandle( cm.getCursor("end").line );
return handle.styleClasses?.textClass?.split(" ").contains("HyperMD-table-row") ?
CodeMirror.commands.goLineEnd(cm) :
old(cm)
;
}
}}));
For the Obsidian core fix, It can of course be implemented without the around decorator, e.g. by adding it as a new smartEnd command that the End key is then bound to, and which then calls either goLineEnd or goLineRight as appropriate.