In GitHub it's possible to suggest code changes through inline comments in pull requests. But I always get the following error message: "suggestions cannot be applied while viewing a subset of changes".
Is there also a way to manually suggest changes in a comment?
Example: screenshot of problem
Besides the button you can also actually use syntax to make a suggestion. You can do it like:
```suggestion
this is my new suggestion
```
How-to code suggest to multiple lines
Apply a code suggestion to multiple lines by highlight dragging the code lines. Starting drag to the right of the line numbers where the comment plus icon appears.
Verify by seeing "Commenting on lines +129 to +145" (or similar) text indicating the multiple line range you are commenting on.
Now the code suggestion will replace more than one line!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With