Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add option to ignore current line when trimming whitespace #12

Merged
merged 19 commits into from Mar 3, 2014
Commits on Feb 28, 2014
  1. Don't touch whitespace on the current line.

    watsonian committed Feb 28, 2014
    It's fairly common to start a method definition and then save
    just before starting in on that method. The result is that the
    method indentation is removed. This happens in a number of
    situations. With this change, whitespace on the current line
    is ignored if there's ONLY whitespace on that line.
  2. Add some tests!

    watsonian committed Feb 28, 2014
  3. No need for the no-op line.

    watsonian committed Feb 28, 2014
  4. Fix off-by-one error.

    watsonian committed Feb 28, 2014
Commits on Mar 1, 2014
  1. Switch to using backwardsScan.

    watsonian committed Mar 1, 2014
    This fixes a bug where the cursor index would change out from under
    you as the replacements in the scan were happening. This was causing
    the cursor row to be mis-identified, which was resulting in inconsistent
    row identification (which looked sort of like an off-by-one error).
    By scanning from the end of the buffer, we prevent the index from getting
    mangled like that and end up with the correct cursor row.
  2. Fix GFM tests.

    watsonian committed Mar 1, 2014
  3. Cleanup and a broken spec.

    watsonian committed Mar 1, 2014