Skip to content

Commit

Permalink
Indentation: Handle first line after opening bracket
Browse files Browse the repository at this point in the history
Fixes: "End position is smaller than start position" error.
  • Loading branch information
juergenhoetzel committed Mar 24, 2023
1 parent 0810010 commit 64faab4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fsharp-mode-structure.el
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ dedenting."
(open-bracket-pos (fsharp-nesting-level)))

(cond
((and open-bracket-pos (eq (and (looking-back "[[:space:]\n\r]+" nil t)
(match-beginning 0))
(1+ open-bracket-pos)))
fsharp-indent-offset)
;; Continuation Lines
((fsharp-continuation-line-p)
(if open-bracket-pos
Expand Down

0 comments on commit 64faab4

Please sign in to comment.