* lisp/progmodes/js.el (js-indent-line): Don't mix columns and chars.
[bpt/emacs.git] / lisp / progmodes / js.el
index 5be1373..a8f0d55 100644 (file)
@@ -1907,7 +1907,7 @@ In particular, return the buffer position of the first `for' kwd."
   (interactive)
   (let* ((parse-status
           (save-excursion (syntax-ppss (point-at-bol))))
-         (offset (- (current-column) (current-indentation))))
+         (offset (- (point) (save-excursion (back-to-indentation) (point)))))
     (indent-line-to (js--proper-indentation parse-status))
     (when (> offset 0) (forward-char offset))))