rejeep / drag-stuff.el

Drag stuff around in Emacs
233 stars 12 forks source link

Wrong indent when using electric-indent-mode #3

Closed simao closed 11 years ago

simao commented 11 years ago

Hello,

When dragging stuff down with electric-indent-mode enabled, lines get too much indentation. for example.

before:
line

after dragging line down 3 times:
            line

Thanks

rejeep commented 11 years ago

Hi, I'm trying to reproduce this, but cant. Check this out: https://github.com/rejeep/drag-stuff/compare/electric-indent-mode Could you update the scenario so it fails the way you expect it to?

simao commented 11 years ago

Hello,

I tried running emacs with -q, then I required drag-stuff and this happened again, but only on ruby-mode. can you try it with ruby mode?

Also, I ran the tests in your electric-indent-mode branch and I have that failing test:

  Scenario: Electric indent mode
    Given I insert:
      """
      line

      """
    And I turn on drag-stuff
    And I turn on electric-indent-mode
    And I drag line "1" down
    Then I should see:
      """

        line
      """
      Expected '
        line' to be part of 'line
      ', but was not.

I am using emacs 24.3.1 if that makes any difference.

Thank you for looking into this.

rejeep commented 11 years ago

Can pull the electric-indent-mode branch and try again please!?

simao commented 11 years ago

Yep, all green now and it works right.

Thanks for fixing it!!

rejeep commented 11 years ago

Fix is now in master. Thanks for reporting!