mirror of
https://github.com/godotengine/emacs-gdscript-mode.git
synced 2025-12-31 21:48:34 +03:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user