Skip to content

Commit

Permalink
Fix hanging of coffee-previous-indent at start of buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
superbobry authored and defunkt committed Mar 25, 2010
1 parent 03f75e3 commit d063614
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions coffee-mode.el
Expand Up @@ -457,8 +457,11 @@ For detail, see `comment-dwim'."

(save-excursion
(forward-line -1)
(while (coffee-line-empty-p) (forward-line -1))
(current-indentation)))
(if (bobp)
0
(progn
(while (coffee-line-empty-p) (forward-line -1))
(current-indentation)))))

(defun coffee-line-empty-p ()
"Is this line empty? Returns non-nil if so, nil if not."
Expand Down

0 comments on commit d063614

Please sign in to comment.