mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
better handle tabify
This commit is contained in:
parent
6ab298ef3f
commit
1d2d9af9a1
1 changed files with 7 additions and 4 deletions
|
|
@ -470,10 +470,11 @@
|
|||
(set-is-dirty t))))
|
||||
(set-on-event-with-data ace "clog-adjust-tabs"
|
||||
(lambda (obj data)
|
||||
(declare (ignore obj))
|
||||
; (declare (ignore obj))
|
||||
(unless (equal data "")
|
||||
(setf data (format nil "~A(" data))
|
||||
(let ((r (make-array '(0) :element-type 'base-char
|
||||
(setf data (format nil "~A;" data))
|
||||
(let ((o (clog-ace:selected-text ace))
|
||||
(r (make-array '(0) :element-type 'base-char
|
||||
:fill-pointer 0 :adjustable t)))
|
||||
(with-output-to-string (s r)
|
||||
(with-input-from-string (n data)
|
||||
|
|
@ -485,9 +486,11 @@
|
|||
(unless start
|
||||
(return))
|
||||
(setf r (subseq r end))))
|
||||
(setf r (subseq r 0 (ppcre:scan "\\S" r)))
|
||||
(setf o (subseq o (ppcre:scan "\\S" o) (length o)))
|
||||
(setf r (format nil "~A~A" r o))
|
||||
(unless (or (eq r nil)
|
||||
(equal r ""))
|
||||
(setf r (subseq r 0 (1- (length r))))
|
||||
(js-execute ace (format nil "~A.insert('~A',true)"
|
||||
(clog-ace::js-ace ace)
|
||||
(escape-string r)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue