Skip to content

Commit 5baf6e5

Browse files
committed
Fix indexing error in isUsedAsInfix
1 parent 742f7ba commit 5baf6e5

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
@@ -636,7 +636,7 @@ isUsedAsInfix line prefixMod prefixText pos
636636

637637
openingBacktick :: T.Text -> T.Text -> T.Text -> Position -> Bool
638638
openingBacktick line prefixModule prefixText Position { _character }
639-
| backtickIndex < 0 = False
639+
| backtickIndex < 0 || backtickIndex > T.length line = False
640640
| otherwise = (line `T.index` backtickIndex) == '`'
641641
where
642642
backtickIndex :: Int

0 commit comments

Comments
 (0)