DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

CodeAction "Extract to procedure" not always available #131

Closed jwikman closed 2 years ago

jwikman commented 2 years ago

Now and then I've experienced that the CodeAction "Extract to procedure" is unavailable when I've been selecting some lines of code. I don't know if this is a limitation that you can resolve, or if it's a VSCode limitation.

This is what I found so far where the CodeAction is gone:

  1. Cursor on blank line, after selection image
  2. Selection starts on a blank line, before the code starts image
  3. Selection includes empty spaces in a line after the code (might be the same as 1. above) image
DavidFeldhoff commented 2 years ago

That's most probably a limitation I can resolve. Thanks for reporting this! I think I'll get to it in 3 weeks as my current 2 weeks are quite full. Cheers David

jwikman commented 2 years ago

No worries, take your time. I know how to live with it, but you will remove some annoyances if you fix this. :)

DavidFeldhoff commented 2 years ago

I created a new version (1.0.10). It wasn't that easy as I thought it would be as the position to rename the procedure afterwards jumped back and forth 😄 But I think I managed it. If you find any bugs with it, please feel free to come back to me and thanks for contributing :)

jwikman commented 2 years ago

Great work @DavidFeldhoff, The above scenarios works now! 👍