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
|
possible and PREVIOUS is non-nil, cycle back to the maximum
|
||||||
level."
|
level."
|
||||||
(let ((follow-indentation-p
|
(let ((follow-indentation-p
|
||||||
;; Check if point is within indentation.
|
(<= (current-column) (current-indentation))))
|
||||||
(and (<= (line-beginning-position) (point))
|
|
||||||
(>= (+ (line-beginning-position)
|
|
||||||
(current-indentation))
|
|
||||||
(point)))))
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(indent-line-to
|
(indent-line-to
|
||||||
(gdscript-indent-calculate-indentation previous))
|
(gdscript-indent-calculate-indentation previous))
|
||||||
|
|||||||
Reference in New Issue
Block a user