File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 59
59
60
60
; ; TODO - fix custom names, move to another ns?
61
61
62
+ (defn get-cursor-location
63
+ " Gets the cursor's current position as a tuple (row, col)."
64
+ []
65
+ (window-get-cursor (vim-get-current-window )))
66
+
62
67
(defn get-cursor-location-async
63
68
" Gets the cursor's current position as a tuple (row, col) asynchronously."
64
69
[f]
71
76
(buffer-get-line-async buffer n #(buffer-set-line-async buffer n
72
77
(update-fn %)
73
78
identity))))
79
+ (defn get-current-buffer-text
80
+ " Convenience function to get the current buffer's text."
81
+ []
82
+ (str/join " \n " (buffer-get-line-slice (vim-get-current-buffer ) 0 -1 )))
83
+
74
84
(defn get-current-buffer-text-async
75
85
" Convenience function to get the current buffer's text asynchronously."
76
86
[f]
You can’t perform that action at this time.
0 commit comments