tamzinblake / js3-mode

A chimeric fork of js2-mode and js-mode
GNU General Public License v3.0
181 stars 13 forks source link

Error when indenting block comments #82

Closed tamzinblake closed 11 years ago

tamzinblake commented 11 years ago

This error (I think) is currently occurring when attempting to indent block comment regions which are missing the *s.

For example:

/*
 * No problem indenting this.
 */

/*
   Problem indenting this.
 */

The message I'm getting is Wrong type argument: wholenump, -1. The error was originally for Wrong type argument: wholenump, -2, but was still an indent-related error. It occurs when attempting to indent individual lines or indent whole regions containing 'malformed' block comments.

From https://github.com/thomblake/js3-mode/issues/28#issuecomment-20297557

emallson commented 11 years ago

That was fast. You, sir, are a badass.

EDIT: Now this is happening:

    /*
      Some comment.
     */ 

Becomes

     /*
Some comment.
      */

It no longer breaks region commenting though, which is a great improvement. In a way, this behavior could be seen as good because it (1) doesn't stop me from working and (2) lets me know which comments (from an old codebase) I need to fix.