浏览代码

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

Junyi Du 3 年之前
父节点
当前提交
eeb48ba6b8
共有 1 个文件被更改,包括 2 次插入1 次删除
  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?)
                   (when (thingatpt/get-setting :properties?)
                     (thingatpt/properties-at-point input))
                     (thingatpt/properties-at-point input))
                   (when (thingatpt/get-setting :list?)
                   (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
           (cond
             thing-at-point
             thing-at-point
             (case (:type thing-at-point)
             (case (:type thing-at-point)