When selecting the last x lines of a file & pressing '/' to put a comment sign ( // ) in front of all, this fails, if the last selected line is the last line of the file.
I've found that the same thing happens even with extra lines at the bottom of a file. For example:
Ensure that there are no trailing spaces at the end of the last line in the file. Place the caret at the end of the last line and hit enter a couple of times. Place the caret back at the end of the last line (from above) and press <shift><up arrow> a few times to select the last non-blank line and a few above it.
Now press / and you will find that all of the lines except for the last non-blank line in the file will have a // placed at the beginning of the file.
I just tried this and thought that I was having no problem commenting the last line but found that there was a new line after the last line (so the last line was actually blank) But in the process of trying this I found a really strange behaviour. If the first line I highlighted started with // (I put a string of //////////// above each function so I can find them) then nothing gets commented out and the two of the / get removed from the first line. If I start highlighting above the line of ///// then everything gets commented out including the //// (except the last line.)