Fix issue #135: 'Emacs temporary files cause DCD to crash'. dcd-server now ignores files starting with '.#'
This commit is contained in:
parent
fd1ac7e07a
commit
46b3370913
|
@ -150,21 +150,19 @@ If you want to restart server, use `ac-dcd-init-server' instead."
|
||||||
|
|
||||||
|
|
||||||
;; utility functions to call process
|
;; utility functions to call process
|
||||||
|
(defun ac-dcd-call-process (prefix &rest args)
|
||||||
(defun ac-dcd-call-process (prefix args)
|
(if (null ac-dcd-executable)
|
||||||
(let ((buf (get-buffer-create ac-dcd-output-buffer-name))
|
(error (format "Could not find dcd-client executable"))
|
||||||
res)
|
(let ((buf (get-buffer-create "*dcd-output*"))
|
||||||
(with-current-buffer buf (erase-buffer))
|
res)
|
||||||
(setq res (apply 'call-process-region (point-min) (point-max)
|
(with-current-buffer buf (erase-buffer))
|
||||||
ac-dcd-executable nil buf nil
|
(setq res (apply 'call-process-region (point-min) (point-max)
|
||||||
args
|
ac-dcd-executable nil buf nil args))
|
||||||
))
|
(with-current-buffer buf
|
||||||
(with-current-buffer buf
|
(unless (eq 0 res)
|
||||||
(goto-char (point-min))
|
(ac-dcd-handle-error res args))
|
||||||
(when (re-search-forward ac-dcd-error-message-regexp nil t)
|
;; Still try to get any useful input.
|
||||||
(ac-dcd-handle-error res args))
|
(ac-dcd-parse-output prefix)))))
|
||||||
;; Still try to get any useful input.
|
|
||||||
(ac-dcd-parse-output prefix))))
|
|
||||||
|
|
||||||
(defsubst ac-dcd-cursor-position ()
|
(defsubst ac-dcd-cursor-position ()
|
||||||
"Get cursor position to pass to dcd-client.
|
"Get cursor position to pass to dcd-client.
|
||||||
|
|
|
@ -101,6 +101,8 @@ struct ModuleCache
|
||||||
{
|
{
|
||||||
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))
|
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))
|
||||||
{
|
{
|
||||||
|
import std.path: baseName;
|
||||||
|
if(fileName.baseName.startsWith(".#")) continue;
|
||||||
getSymbolsInModule(fileName);
|
getSymbolsInModule(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue