Skip to content

Commit 22e5ebd

Browse files
Fix off by one indexing error (#2629)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent aea3579 commit 22e5ebd

File tree

1 file changed

+1
-1
lines changed
  • ghcide/src/Development/IDE/Plugin/Completions

1 file changed

+1
-1
lines changed

ghcide/src/Development/IDE/Plugin/Completions/Logic.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ isUsedAsInfix line prefixMod prefixText pos
732732

733733
openingBacktick :: T.Text -> T.Text -> T.Text -> Position -> Bool
734734
openingBacktick line prefixModule prefixText Position { _character=(fromIntegral -> c) }
735-
| backtickIndex < 0 || backtickIndex > T.length line = False
735+
| backtickIndex < 0 || backtickIndex >= T.length line = False
736736
| otherwise = (line `T.index` backtickIndex) == '`'
737737
where
738738
backtickIndex :: Int

0 commit comments

Comments
 (0)