As the title says, this fixes an issue preventing the editor shortcuts from working when the text was selected starting from the end. In this case, s_end < s_start, causing the subsequent code to break. I've added a utility function that reads out both indices from the editor and returns them in ascending order and updated the other functions appropriately.
As the title says, this fixes an issue preventing the editor shortcuts from working when the text was selected starting from the end. In this case,
s_end < s_start
, causing the subsequent code to break. I've added a utility function that reads out both indices from theeditor
and returns them in ascending order and updated the other functions appropriately.