Skip to content
Browse files

Correct condition for enabling syntax highlighting after merging try-…

…doc-listbox2 changes to latest master
  • Loading branch information...
1 parent f8761c0 commit 80a7d148b8183727a5c2a5584687fb6671099da0 @jafingerhut jafingerhut committed
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/clj_ns_browser/browser.clj
View
12 src/clj_ns_browser/browser.clj
@@ -15,6 +15,7 @@
[clojure.java.shell]
[clojure.java.io]
[clojure.pprint]
+ [clojure.set :as set]
[clojure.string :as str]
[clj-info.doc2map :as d2m]
[clj-ns-browser.inspector]
@@ -999,12 +1000,15 @@
;;
;; turn syntax-highlighting on/off - only on for Source
(b/bind
- (b/selection (id :doc-cbx))
+ (b/selection (id :doc-lb) {:multi? true})
(b/transform (fn [o]
(when (= (.getName (type (id :doc-ta))) "org.fife.ui.rsyntaxtextarea.RSyntaxTextArea")
- (if (or (= "Source" o) (= "Examples" o) (= "Meta" o))
- (config! (id :doc-ta) :syntax :clojure)
- (config! (id :doc-ta) :syntax :none))))))
+ (let [selected-set (set o)]
+ (if (= selected-set
+ (set/intersection selected-set
+ #{"Source" "Examples" "Meta"}))
+ (config! (id :doc-ta) :syntax :clojure)
+ (config! (id :doc-ta) :syntax :none)))))))
;;
;; bring up browser with url
(b/bind

0 comments on commit 80a7d14

Please sign in to comment.
Something went wrong with that request. Please try again.