branch: elpa/typescript-mode
commit 361564c4a9233a59c29cb4312b188372d7723c10
Author: Jostein Kjønigsen <[email protected]>
Commit: Jostein Kjønigsen <[email protected]>
typescript-current-column: Dont cause side-effects.
---
typescript-mode.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index f4465495dd..d6988ff87a 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1798,9 +1798,10 @@ nil."
(defun typescript-current-column ()
"Unicode aware version of `CURRENT-COLUMN' which correctly accounts for wide
characters."
- (let* ((end (point)))
- (move-beginning-of-line nil)
- (- end (point))))
+ (save-excursion
+ (let* ((end (point)))
+ (move-beginning-of-line nil)
+ (- end (point)))))
(defun typescript-indent-line ()
"Indent the current line as typescript."