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 <samueld@mailo.com>
This commit is contained in:
Samuel D
2023-10-24 13:50:57 +02:00
committed by GitHub
parent 3e2ae19f03
commit 8a28276daa

View File

@@ -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))