aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflyingleafe <flyingleafe@gmail.com>2014-08-23 01:56:00 +0600
committerDave Mayo <pobocks@gmail.com>2014-08-24 17:07:32 -0400
commitefa7783b16fc91737dd74863d3d91c15cb54510b (patch)
treee88c9e4c52b10e01a379da14760d7919783336b8
parent40c588077d69787db91f5d48c2c1df8e2c464274 (diff)
downloademmet-mode-efa7783b16fc91737dd74863d3d91c15cb54510b.tar.lz
emmet-mode-efa7783b16fc91737dd74863d3d91c15cb54510b.tar.xz
emmet-mode-efa7783b16fc91737dd74863d3d91c15cb54510b.zip
Added Sass abbrs proper cursor positioning
-rw-r--r--emmet-mode.el5
-rw-r--r--src/mode-def.el5
2 files changed, 6 insertions, 4 deletions
diff --git a/emmet-mode.el b/emmet-mode.el
index 090ca13..d01cca3 100644
--- a/emmet-mode.el
+++ b/emmet-mode.el
@@ -3720,8 +3720,9 @@ See also `emmet-expand-line'."
(length str)))) ; ok, just go to the end
(defun emmet-css-next-insert-point (str)
- (string-match ": *\\(;\\)$" str)
- (or (match-beginning 1) (length str)))
+ (let ((regexp (if emmet-use-sass-syntax ": *\\($\\)" ": *\\(;\\)$")))
+ (string-match regexp str)
+ (or (match-beginning 1) (length str))))
(defvar emmet-flash-ovl nil)
(make-variable-buffer-local 'emmet-flash-ovl)
diff --git a/src/mode-def.el b/src/mode-def.el
index 31f9d23..3395909 100644
--- a/src/mode-def.el
+++ b/src/mode-def.el
@@ -231,8 +231,9 @@ See also `emmet-expand-line'."
(length str)))) ; ok, just go to the end
(defun emmet-css-next-insert-point (str)
- (string-match ": *\\(;\\)$" str)
- (or (match-beginning 1) (length str)))
+ (let ((regexp (if emmet-use-sass-syntax ": *\\($\\)" ": *\\(;\\)$")))
+ (string-match regexp str)
+ (or (match-beginning 1) (length str))))
(defvar emmet-flash-ovl nil)
(make-variable-buffer-local 'emmet-flash-ovl)