dominikh / go-mode.el

Emacs mode for the Go programming language
BSD 3-Clause "New" or "Revised" License
1.37k stars 209 forks source link

fill-region hangs #390

Closed dominikh closed 2 years ago

dominikh commented 2 years ago

Buffer:

package pkg

Run: (fill-region 1 5)

Observed behavior: fill-region doesn't return.

dominikh commented 2 years ago

Bisected to fbf25445b22a50ec238fa5fd3c1d3227f78a0f2f

/cc @muirdm

dominikh commented 2 years ago

Early debugging suggests that fill-forward-paragraph-function is supposed to move point, but go--fill-forward-paragraph isn't always doing it. Testing it, it seems to move forward when looking at comments, doesn't move at all when in column 0, and moves backwards when not in column 0, for a positive argument.

dominikh commented 2 years ago

Assigning this to myself for now. I'm not happy with all the limitations and hacks involved in our fill-paragraph handling.