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.

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.

Best regards.
_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to