aboutsummaryrefslogtreecommitdiff
path: root/src/hooks/useCursorPosition.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/hooks/useCursorPosition.ts')
-rw-r--r--src/hooks/useCursorPosition.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hooks/useCursorPosition.ts b/src/hooks/useCursorPosition.ts
new file mode 100644
index 0000000..479598d
--- /dev/null
+++ b/src/hooks/useCursorPosition.ts
@@ -0,0 +1,8 @@
+import { useTabsStore } from '@/stores/useTabsStore'
+
+export function useCursorPosition() {
+ const cursorLine = useTabsStore((s) => s.cursorLine)
+ const cursorCol = useTabsStore((s) => s.cursorCol)
+
+ return { cursorLine, cursorCol }
+}