File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 43
43
:type 'string
44
44
:group 'atl-markup )
45
45
46
+ (defcustom atl-markup-delay 0.1
47
+ " Time delay to active auto truncate lines for markup languages."
48
+ :type 'float
49
+ :group 'atl-markup )
50
+
51
+ (defvar atl-markup--timer nil
52
+ " Timer to active auto truncate lines." )
53
+
46
54
; ;; Util
47
55
48
56
(defun atl-markup--inside-comment-block-p ()
82
90
83
91
(defun atl-markup--post-command-hook ()
84
92
" Post command hook to do auto truncate lines in current buffer."
85
- (atl-markup--web-truncate-lines-by-face))
93
+ (when (timerp atl-markup--timer)
94
+ (cancel-timer atl-markup--timer)
95
+ (setq atl-markup--timer nil ))
96
+ (run-with-idle-timer atl-markup-delay nil 'atl-markup--web-truncate-lines-by-face ))
86
97
87
98
(defun atl-markup--enable ()
88
99
" Enable 'atl-markup-mode'."
You can’t perform that action at this time.
0 commit comments