Update jsCaret.js

extend case of getLastWord