AntlrVSIX icon indicating copy to clipboard operation
AntlrVSIX copied to clipboard

VS2019 allows positioning the cursor past the end of line--whatever that means.

Open kaby76 opened this issue 4 years ago • 0 comments

While refining the edge cases for the unfold transform, I noticed that VS2019 allows one to position the cursor "past the end of the line". For example, I have a line that is completely blank, with no characters in the line, ending with a '\r'n' line delimiter. In theory, I should only be allowed to click on column 0 (zero-based column numbers) because there are no characters in the line. Since there is no character at column 1, I shouldn't be able to position the cursor there, but VS2019 allows it erroneously. It makes no sense. To further confuse the user, if I click on column 0, then use the right arrow to position to the next character, it jumps to the next line.

Right now, the line/column to index calculator (int index = LanguageServer.Module.GetIndex(line, character, document)) does not take into account this bizarre erroneous VS2019 BS. And, I'm not sure what to do.

kaby76 avatar May 12 '20 18:05 kaby76