* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Handles the case of comments in a
comment block that begin with whitespaces.
(cherry picked from commit
1f443c277a1215ab6353c47161819af155638110)
(let ((prefix (match-string 1)))
(if soft (insert-and-inherit ?\n) (newline 1))
(delete-region (line-beginning-position) (point))
- (insert prefix)))))
+ (insert prefix)))
+
+ ;; Line starts with whitespaces
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at (rx (* " "))))
+ (let ((whitespaces (match-string 0)))
+ (if soft (insert-and-inherit ?\n) (newline 1))
+ (delete-region (line-beginning-position) (point))
+ (insert whitespaces)))))
;;; Statement indent