From 8a28276daaa23f10e986367b80dc751c5d26829e Mon Sep 17 00:00:00 2001 From: Samuel D <34922853+BrachystochroneSD@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:50:57 +0200 Subject: [PATCH] fix: Follow indent cleaning (#141) `(line-beginning-position)` and `(point)` work with character (tab = 1 character) but `(current-indenantion)` give the column number of the indenantion (tab = 4 columns) Using `(current-indentation)` and `(current-indentation)` is cleaner and use the same convention of "column numbering" Co-authored-by: Samuel D --- gdscript-indent-and-nav.el | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gdscript-indent-and-nav.el b/gdscript-indent-and-nav.el index 3c10af5..fd0d306 100644 --- a/gdscript-indent-and-nav.el +++ b/gdscript-indent-and-nav.el @@ -347,11 +347,7 @@ to the maximum available level. When indentation is the minimum possible and PREVIOUS is non-nil, cycle back to the maximum level." (let ((follow-indentation-p - ;; Check if point is within indentation. - (and (<= (line-beginning-position) (point)) - (>= (+ (line-beginning-position) - (current-indentation)) - (point))))) + (<= (current-column) (current-indentation)))) (save-excursion (indent-line-to (gdscript-indent-calculate-indentation previous))