We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 495f496 commit 93ab1e1Copy full SHA for 93ab1e1
src/lanterna/screen.clj
@@ -139,8 +139,20 @@
139
appears in a specific place.
140
141
"
142
- [^Screen screen x y]
143
- (.setCursorPosition screen x y))
+ ([^Screen screen x y]
+ (.setCursorPosition screen x y))
144
+ ([^Screen screen pos]
145
+ (apply #(.setCursorPosition screen %1 %2) pos)))
146
+
147
148
+(defn get-cursor
149
+ "Return the cursor position as [col row]."
150
+ [^Screen screen]
151
+ (let [pos (.getCursorPosition screen)
152
+ col (.getColumn pos)
153
+ row (.getRow pos)]
154
+ [col row]))
155
156
157
(defn put-string
158
"Put a string on the screen buffer, ready to be drawn at the next redraw.
0 commit comments