code: function(pos) {
        var doc = this.doc, line = getLine(doc, pos.line).text;
        var start = pos.ch, end = pos.ch;
        if (line) {
          var helper = this.getHelper(pos, "wordChars");
          if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
          var startChar = line.charAt(start);
          var check = isWordChar(startChar, helper)
            ? function(ch) { return isWordChar(ch, helper); }
            : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
            : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
          while (start > 0 && check(line.charAt(start - 1))) --start;
          while (end < line.length && check(line.charAt(end))) ++end;
        }
        return new Range(Pos(pos.line, start), Pos(pos.line, end));
      }
docs: Find the word at the given position (as returned by coordsChar).