Browse Source

enhance: only apply DWIM to list item when cursor at EOL

Junyi Du 3 years ago
parent
commit
eeb48ba6b8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/handler/editor.cljs

+ 2 - 1
src/main/frontend/handler/editor.cljs

@@ -2421,7 +2421,8 @@
                   (when (thingatpt/get-setting :properties?)
                     (thingatpt/properties-at-point input))
                   (when (thingatpt/get-setting :list?)
-                    (thingatpt/list-item-at-point input)))]
+                    (and (cursor/end-of-line? input) ;; only apply DWIM when cursor at EOL 
+                         (thingatpt/list-item-at-point input))))]
           (cond
             thing-at-point
             (case (:type thing-at-point)