Christian Rocha
9b47f26bdd
Doc and logic corrections per the linter
2020-10-28 21:27:15 -04:00
Christian Rocha
9c780011ff
Underpinnings for always-on and always-hidden cursor modes
2020-10-28 21:27:15 -04:00
Christian Rocha
8148e61443
Correct ^F/^B keybindings for forward/back cursor movement
2020-10-28 21:27:15 -04:00
Christian Rocha
ce7d8da084
Fix lock-up that could occur with cursor blinking
...
Note that to do this we've replaced the blink timer with a context.
2020-10-28 21:27:15 -04:00
Christian Rocha
d14fdf585c
Textinput Update and View functions are now methods on the model
2020-10-28 21:27:15 -04:00
Christian Rocha
bf7719e6c1
Handle paste via command/message since it's IO
2020-10-28 21:27:15 -04:00
Christian Rocha
1b530b293c
Reset blink timer when moving the cursor
2020-10-28 21:27:15 -04:00
Christian Rocha and Christian Rocha
5dbcf95877
Fix situation where short viewports would panic ( closes #20 )
2020-10-25 15:21:49 -04:00
Christian Rocha and Christian Rocha
703de11da4
Fix regression where cursor was misplaced after a paste
2020-10-24 19:51:13 -04:00
Christian Rocha and Christian Rocha
03461d6804
Fix panic when pasting into a textinput with no char limit
2020-10-24 19:51:13 -04:00
Christian Rocha and Christian Rocha
bdd909a5d7
Textinput: bind home/end and fix behavior of delete key
2020-10-22 15:36:54 -04:00
Christian Rocha
a498b857d6
Update paginator for bubbletea 0.12.0
2020-10-16 14:36:08 -04:00
Christian Rocha
82097a1c79
Remove unused function
2020-10-16 11:54:44 -04:00
Christian Rocha
a8ec421800
Update bubbletea and termenv dependencies
2020-10-16 11:54:00 -04:00
Christian Rocha
9c10cd0586
Remove unused ErrMsg type from textinput module
2020-10-15 18:52:36 -04:00
Christian Rocha
154f3763f7
textinput.View can just accept a textinput.Model argument
2020-10-15 18:43:08 -04:00
Christian Rocha
eff931bdea
Remove replace directive for bubbletea in go.mod
2020-10-12 22:15:02 -04:00
Christian Rocha
0d7b3ed8e8
Fix URLs to Charm and Glow in README
2020-10-06 13:25:46 -04:00
Christian Rocha
cbafae84f9
Update mouse wheel stuff in paginator per last-minute Bubble Tea API change
2020-10-06 12:29:18 -04:00
Christian Rocha
959598c9aa
Fix outdated comment
2020-10-02 13:03:04 -04:00
Christian Rocha
5f7c8b5375
Simplify the API around fine-grained spinner display rules
2020-08-25 09:36:43 -04:00
Christian Rocha
75df6b96a1
Don't return the current frame in TickMsg
2020-08-24 21:09:28 -04:00
Christian Rocha
084d0acefd
Fix comments + minimum lifetime should work in conjunction with HideFor
2020-08-24 21:07:45 -04:00
Christian Rocha
e8526ec4ef
Optional fine-grained rules for the spinner about when and how long to show it
2020-08-24 20:03:54 -04:00
Christian Rocha
68f11d0b63
Update termenv to 0.7.2
2020-08-22 11:24:06 -04:00
Christian Rocha
d4a0ecd3ee
Bump bubbletea dependency and set termenv dependency to v0.7.0
2020-08-20 13:31:31 -04:00
Christian Rocha
dbd40713ce
Remove extraneous methods
2020-07-29 20:04:09 -04:00
Christian Rocha
7fa53ea961
Link directly to example code and flesh out pagination component description
2020-07-29 16:38:59 -04:00
Christian Rocha
0cc5e71a63
Flesh out README and add Charm badge
2020-07-29 16:34:01 -04:00
Christian Rocha
f11ca377f4
Add clipboard paste support to textarea
2020-07-23 11:53:58 -04:00
Christian Rocha
10022c964c
Fix slice out of bounds errors that could happen when deleting text
2020-07-21 18:22:18 -04:00
Christian Rocha
5357dd61bd
Fix bug where scroll wheel could create duplicate lines on top and bottom
2020-07-20 17:46:15 -04:00
Christian Rocha
5a26cb0d8e
Use pgup/pgdown as default paginator keystrokes
2020-07-20 12:13:53 -04:00
Christian Rocha
88469a499e
Tidy up the key case switch in viewport
2020-07-20 11:56:35 -04:00
Christian Rocha
b130d96434
Add methods for jumping to the tom and bottom of the viewport
2020-07-17 19:22:08 -04:00
Christian Rocha
185a19e56f
Fix cases where pager would add blank lines to bottom of document
2020-07-17 18:38:38 -04:00
Christian Rocha
dbb1d93970
Remove redundant viewport commands
2020-07-17 18:22:51 -04:00
Christian Rocha
2f909886c1
Be more consistent with max() argument order
2020-07-17 18:13:48 -04:00
Christian Rocha
5720cfb35a
Correct scroll percentage reporting
2020-07-17 18:13:05 -04:00
Christian Rocha
3c07b97d37
Correct typo, add potential TODO
2020-07-17 17:02:37 -04:00
Christian Rocha
9b3e5476c3
Update README a little.
2020-07-17 14:03:02 -04:00
Christian Rocha
74e84eca55
Bump Bubbletea dependency
2020-07-14 18:26:59 -04:00
Christian Rocha
ccf4c90b6b
Rework spinner to allow for user-defined custom spinners
2020-07-14 18:21:48 -04:00
Christian Rocha
f341e3c896
Correct mouse wheel behavior
2020-06-23 13:10:50 -04:00
Christian Rocha
c9196e5407
Add basic mouse wheel support to viewport
2020-06-23 12:00:17 -04:00
Christian Rocha
f967f6a87f
Fix a bug where placeholder text would not reappear post-input
2020-06-22 15:28:38 -04:00
Christian Rocha
35c3cd626d
Fix spinner frame skipping and remove custom message functionality
2020-06-22 14:49:21 -04:00
Christian Rocha
2525319d72
Bump dependencies
2020-06-22 13:51:51 -04:00
Christian Rocha
e9dd6b06e0
Fix duplicate character bug when deleting chars in long strings
...
If the string is longer than the width of the field and the horizontal
viewport (so to speak) was on the right edge, the last character would
repeat when deleting characters because the viewport offset wasn't being
corrected. This fixes that.
2020-06-20 23:34:19 -04:00
Christian Rocha
7cef3a6f59
Document comments
2020-06-20 13:59:13 -04:00
Christian Rocha
1cdc2045c7
Fix a potential out of bounds panic
2020-06-19 19:46:51 -04:00
Christian Rocha
cc480dd2f3
Comments
2020-06-19 19:02:14 -04:00
Christian Rocha
0c1781fbb3
Clamp scroll percentage
2020-06-19 15:04:23 -04:00
Christian Rocha
5255143e87
Rework high performance half-view up/down
2020-06-19 13:23:14 -04:00
Christian Rocha
1629afe087
Rework high-performance pgup/pgdown
2020-06-19 12:20:35 -04:00
Christian Rocha
da3150ded7
Rework high performance line-up/line-down
2020-06-19 11:51:44 -04:00
Christian Rocha
b82cf5071d
Send newlines instead of cursor-downs in performance viewport
2020-06-18 18:31:30 -04:00
Christian Rocha
d095a6554c
Retire the internal viewport renderer
2020-06-18 18:25:57 -04:00
Christian Rocha
34ac608122
Correct slice bounding
2020-06-18 16:29:05 -04:00
Christian Rocha
09ae5da7c3
Don't get/set size in viewport; that should happen in the parent
2020-06-18 14:14:21 -04:00
Christian Rocha
5572542e2e
Add command to sync initial high performance view
2020-06-18 13:42:11 -04:00
Christian Rocha
3688351ddf
Viewport now can use Bubble Tea high performance scroll renderer (ish)
2020-06-17 20:55:49 -04:00
Christian Rocha
d9c03fc0b0
Add cursor positioning functions to viewport renderder
2020-06-16 16:10:34 -04:00
Christian Rocha
3321ac12a9
Renderer comments
2020-06-16 14:34:46 -04:00
Christian Rocha
0eaea5cc5d
Use as much terminal movement from termenv as we can
2020-06-16 14:32:00 -04:00
Christian Rocha
0243dff9d3
Remove irrelevant (and erroneous) width settings in viewport renderer
2020-06-16 14:28:01 -04:00
Christian Rocha
68ec6c7ffc
Integrate viewport navigation controls with new renderer
2020-06-15 21:22:25 -04:00
Christian Rocha
f332bf2cc2
Simplify the render's write() method and it now takes a slice of lines
2020-06-15 21:21:08 -04:00
Christian Rocha
0b19d41e0a
Broad (working) pass at viewport renderer
2020-06-15 21:21:08 -04:00
Christian Rocha
786ec557d4
Bumb Bubble Tea dependency
2020-06-15 12:02:14 -04:00
Christian Rocha
d3192a3e70
Update text input viewport scrolling to handle unicode characters
2020-06-11 21:24:41 -04:00
Christian Rocha
74cc86fce5
Use a slice of runes as the underlying textinput value
2020-06-11 18:35:18 -04:00
Christian Rocha
72fd4e3e3e
Update to latest Bubble Tea renderer + bump termenv
2020-06-08 13:06:38 -04:00
Christian Rocha
12b2758d50
Fix panic in paginator when setting total items to zero
2020-06-02 18:48:00 -04:00
Christian Rocha
87c7cd778f
Rename to Bubbles + copy over components from Bubble Tea + remove examples
2020-05-25 20:08:37 -04:00
Christian Rocha
a72bf9128d
Update spinner to use proper tea.Tick subscription
2020-05-11 17:33:28 -04:00
Christian Rocha
5179df1982
Bump dependencies
2020-05-11 17:21:14 -04:00
Christian Rocha
da64445a0e
Update subs for Tea v0.2.1. That is to say, remove the their arguments.
2020-05-04 18:54:26 -04:00
Christian Rocha
6c2e144255
Bump termenv with fix for redraws on mosh, konsole
2020-04-30 19:30:41 -04:00
Christian Rocha
7ef18ab69e
Fix a bug where text inputs with no char limit couldn't take input
2020-04-23 12:10:53 -04:00
Christian Rocha
bf2d13df66
Rename input to textinput + DefaultModel is now NewModel
2020-04-23 12:10:09 -04:00
Christian Rocha
a2ae308e68
Bump Tea dependency to v0.2.0
2020-04-23 12:04:45 -04:00
Christian Rocha
5d987f7933
Remove redundant type declaration
2020-04-22 14:29:58 -04:00
Christian Rocha
d964fbe3d7
Updates for Tea v0.2.0
2020-04-22 14:29:58 -04:00
Christian Rocha
5dd3605496
Helper function for navigating sets + comments
2020-04-09 22:18:31 -04:00
Christian Rocha
fc64be59d6
Export pagination helpers
2020-04-09 19:37:59 -04:00
Christian Rocha
363c2522f2
Helper function for paginating slices
2020-04-09 18:21:17 -04:00
Christian Rocha
2953608151
Arabic pager by default, no RTL for now
2020-04-09 18:03:34 -04:00
Christian Rocha
821de006ee
Add more keybinding options to pager
2020-04-09 16:47:32 -04:00
Christian Rocha
b931aeaf0f
Blind pass at paginator
2020-04-09 15:43:55 -04:00
Christian Rocha
ea5161af98
Add an optional character limit to text inputs
2020-04-01 20:51:56 -04:00
Christian Rocha
7ddc284804
Bump termenv to v0.5.0
2020-04-01 20:51:56 -04:00
Christian Rocha
eea5c2a32a
Add color settings to spinner
2020-03-27 14:14:02 -04:00
Christian Rocha
c9aefb2448
Bump termenv dependency
2020-03-27 12:15:28 -04:00
Christian Rocha
9225516bf4
Just set the color profile on the package level
2020-02-24 22:59:33 -05:00
Christian Rocha
f4a59f7bc3
Text color setting on input element
2020-02-24 22:43:52 -05:00
Christian Rocha
aecd5ac8e2
Update termenv and remove nil pointer workaround
2020-02-24 22:31:45 -05:00
Christian Rocha
05a2984fe2
Update dependencies
2020-02-20 10:26:41 -05:00
Christian Rocha
d6a178e176
Quick 'n dirty submit button
2020-02-20 10:18:06 -05:00
Christian Rocha
8511766df2
Highlight prompt in focused text field
2020-02-20 10:02:09 -05:00