Skip to content

Commit 25e0a9e

Browse files
committed
Fix indentation of object operator at the beginning of line
#623
1 parent 32b2002 commit 25e0a9e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

php-mode.el

+5-2
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,11 @@ might be to handle switch and goto labels differently."
636636
(defun php-lineup-cascaded-calls (langelem)
637637
"Line up chained methods using `c-lineup-cascaded-calls',
638638
but only if the setting is enabled"
639-
(when php-mode-lineup-cascaded-calls
640-
(c-lineup-cascaded-calls langelem)))
639+
(if php-mode-lineup-cascaded-calls
640+
(c-lineup-cascaded-calls langelem)
641+
(save-excursion
642+
(beginning-of-line)
643+
(if (looking-at-p "\\s-*->") '+ nil))))
641644

642645
(c-add-style
643646
"php"

0 commit comments

Comments
 (0)