positionInRange function in PluginUtils doesn't work as its name suggests #2618
Labels
status: needs triage
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Look closely at this function:
haskell-language-server/hls-plugin-api/src/Ide/PluginUtils.hs
Lines 222 to 227 in b937baa
If this range has only 1 line, and the position lies in the same line as the range, but after the end of the range, then,
the second branch will fail, but the third branch will succeed, which is not expected, I think.
Your environment
Which OS do you use:
Steps to reproduce
I wrote a testcase for that
Expected behaviour
Position 1 10
is not in the range ofPosition 1 1
andPosition 1 3
. The above testcase should pass.Actual behaviour
The testcase fails

The text was updated successfully, but these errors were encountered: