Skip to content

Commit

Permalink
Fix highlight source for Idris 1 protocol >= 1
Browse files Browse the repository at this point in the history
Currently last char of keyword when loaded in Idris 1
is undecorated due to wrong condition'
  • Loading branch information
keram committed Dec 1, 2022
1 parent d08fd3e commit 216945f
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions idris-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,23 @@ A prefix argument forces loading but only up to the current line."
(when (string= (file-name-nondirectory fn)
(file-name-nondirectory (buffer-file-name)))
(let ((start-line (if (>=-protocol-version 2 1)
(+ 1 start-line-raw)
(1+ start-line-raw)
start-line-raw))
(start-col (if (>=-protocol-version 2 1)
(+ 1 start-col-raw)
(1+ start-col-raw)
start-col-raw))
(end-line (if (>=-protocol-version 2 1)
(+ 1 end-line-raw)
end-line-raw ))
(end-col (if (>= idris-protocol-version 2 1)
(+ 1 end-col-raw)
end-col-raw )))
(1+ end-line-raw)
end-line-raw))
(end-col (if (>= idris-protocol-version 1)
(1+ end-col-raw)
end-col-raw)))
(idris-highlight-input-region (current-buffer)
start-line start-col
end-line end-col
props)))))))
start-line start-col
end-line end-col
props)))))))
(_ (idris-make-clean)
(idris-update-options-cache)

(setq idris-currently-loaded-buffer (current-buffer))
(when (member 'warnings-tree idris-warnings-printing)
(idris-list-compiler-notes))
Expand Down

0 comments on commit 216945f

Please sign in to comment.