Skip to content

Commit

Permalink
Remove timeout from read-form, it broke for some
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Aug 6, 2019
1 parent d4ef380 commit 6cd17b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/conjure/nvim.clj
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,11 @@
;; Ignore matches inside comments or strings.
;; We only have to do this for non-root form reading.
;; https://github.com/Olical/conjure/issues/34
skip (if root?
0
skip (when-not root?
"!conjure#cursor_in_code()")
stopline 0
timeout 50

get-pair (fn [s e]
(let [extra-args [skip stopline timeout]]
(let [extra-args (remove nil? [skip])]
[(apply api/call-function :searchpairpos s "" e backwards extra-args)
(apply api/call-function :searchpairpos s "" e forwards extra-args)]))

Expand Down
4 changes: 2 additions & 2 deletions test/conjure/nvim_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
(t/testing "a skip is provided to non-root form reads"
;; Non-root has skip.
(defmethod call :nvim-call-function [{:keys [params]}]
(t/is (= (count (second params)) 7))
(t/is (= (count (second params)) 5))
(pair-pos params
{"(" [2 16]
")" [2 30]}))
Expand All @@ -110,7 +110,7 @@

;; Root does not.
(defmethod call :nvim-call-function [{:keys [params]}]
(t/is (= (count (second params)) 7))
(t/is (= (count (second params)) 4))
(pair-pos params
{"(" [2 16]
")" [2 30]}))
Expand Down

0 comments on commit 6cd17b7

Please sign in to comment.