Skip to content

Commit

Permalink
Small fix for filling
Browse files Browse the repository at this point in the history
  • Loading branch information
taku0 committed May 7, 2023
1 parent 6beef52 commit fc3d16a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions swift-mode-fill.el
Original file line number Diff line number Diff line change
Expand Up @@ -554,16 +554,15 @@ Return non-nil if skipped a paragraph. Return nil otherwise."
(swift-mode:fill-skip-paragraph-in-multiline-chunk
chunk
direction
"\\s *#*\"+\\s *$\\|\\s *\"+#*/\\s *$"
"\\s *#*\"+\\s *$\\|\\s *\"+#*\\s *$"
(if (eq direction 'backward)
(lambda ()
(skip-chars-forward "#")
(skip-chars-forward "\"")
(skip-syntax-forward " "))
(lambda ()
(when (memq (char-before) '(?# ?\"))
(skip-chars-backward "#")
(skip-chars-backward "\""))
(skip-chars-backward "#")
(skip-chars-backward "\"")
(skip-syntax-backward " ")))))

(defun swift-mode:fill-skip-paragraph-in-multiline-chunk
Expand Down

0 comments on commit fc3d16a

Please sign in to comment.