On Fri, 12 Mar 2010 20:05:01 +0100, Thomas wrote:
The attached patch fixes that the cursor jumps sometimes when toggling comments. The cause was slightly confused math. It also works fine with empty lines.
Finally applied in SVN. Thanks a lot.
There's another issue with comment toggling which I don't address: If the cursor is at in front of a comment block (e.g. ">....|/*", > is start of the line, . is a space, | is the cursor), toggle will uncomment the comment that comes before this one, i.e. a completely unrelated one. This is because the toggle logic goes back in the doc to find the comment marker. Fixing this appeared non-trivial to me.
I guess this might be quite a small issue, hard to happen usually.
Regards, Enrico