[Geany-devel] [PATCH] Fix cursor movement when toggling comments.

Thomas Martitz thomas.martitz at xxxxx
Fri Mar 12 19:05:01 UTC 2010


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.



More information about the Devel mailing list