branch: elpa/typescript-mode
commit d5c4fb27c896e37d6adaa61f55b275ba9efa7b98
Merge: 666052f09f a6e0eac105
Author: Jostein Kjønigsen <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #24 from hekt/wrong-cursor-position
    
    Fix wrong cursor position in `typescript-indent-line`
---
 typescript-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index ba2919decc..530834f86f 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1769,7 +1769,7 @@ nil."
     (widen)
     (let* ((parse-status
             (save-excursion (syntax-ppss (point-at-bol))))
-           (offset (- (current-column) (current-indentation))))
+           (offset (- (point) (line-beginning-position) 
(current-indentation))))
       (indent-line-to (typescript--proper-indentation parse-status))
       (when (> offset 0) (forward-char offset)))))
 

Reply via email to