From 216945f4a6e74890f346cd7b5b08d09284239e3a Mon Sep 17 00:00:00 2001 From: Marek L Date: Mon, 28 Nov 2022 00:52:11 +0000 Subject: [PATCH] Fix highlight source for Idris 1 protocol >= 1 Currently last char of keyword when loaded in Idris 1 is undecorated due to wrong condition' --- idris-commands.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/idris-commands.el b/idris-commands.el index d8ae22a7..daa51c46 100644 --- a/idris-commands.el +++ b/idris-commands.el @@ -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))