bubbles icon indicating copy to clipboard operation
bubbles copied to clipboard

feat(textarea): add methods for moving the cursor to a given line

Open meowgorithm opened this issue 1 year ago • 2 comments

We added the following methods:

  • func(m *Model) SetCursorPosition(x, y int)
  • func(m *Model) SetCursorRow(int)
  • func(m *Model) SetCursorColumn(int)

SetCursor is now deprecated in favor of SetCursorColumn.

meowgorithm avatar Jul 18 '24 01:07 meowgorithm

We should probably include some example usage on this

bashbunni avatar Jan 22 '25 19:01 bashbunni

Found this pull request, because I was going to make one just like it. Some additional ideas:

  • textarea.CursorEnd should be renamed to textarea.CursorLineEnd
  • textarea.CursorEnd should do the same as pressing Ctrl+End - jumping to end of input
  • mirror the above two for CursorStart

dkotik avatar Jan 28 '25 04:01 dkotik

This one's a bit stale now—how do we feel about it? @lrstanley, wonder if you have any insight.

Can also just close it a well—easy enough to reimplement.

meowgorithm avatar Oct 01 '25 16:10 meowgorithm