فهرست منبع

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?)
                     (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)