Commit Graph
203 Commits
Author SHA1 Message Date
Christian Rocha 9449cc7e41 Don't allow word-based deletion when input is masked in textinput
alt+d and ctrl+w will now delete all the way to the beginning and end,
respectively, if EchoMode is not EchoNormal.
v0.7.9
2021-04-26 12:03:57 -04:00
Christian Rocha 58a177394e Don't allow word-to-word movement when input is masked in textinput
When EchoMode is not set to EchoNormal, alt+left/alt+b and
alt+right/alt+b jumps to the beginning and the end, respectively, so as
not to reveal word breaks in the masked text.
2021-04-26 12:03:57 -04:00
Christian Rocha f016c31d83 Add method for returning cursor position in textinput
Previously, Cursor was a member on the model that did absolutely
nothing.
2021-04-26 12:03:57 -04:00
Christian Rocha 74436326b9 Public cursor movement functions no longer return values in textinput
Previously, textinput.SetCursor, textinput.CursotStart, and
textinput.CursorEnd returned bools used interally for managing cursor
blinking. Those methods have been replaced with private counterparts.
2021-04-26 12:03:57 -04:00
Christian Rocha 158097df66 Keep y-offset in bounds when setting content v0.7.8 2021-04-19 19:47:50 -04:00
Christian Rocha 0d5d7e5acd Remove deadcode + small comment on Lip Gloss v0.7.7 2021-04-13 17:09:23 -04:00
Christian Rocha ddd48d9ab7 TextInput now uses Lip Gloss for styling 2021-04-13 17:09:23 -04:00
Christian Rocha 7242bbe8dc Spinner now uses Lip Gloss for styling 2021-04-13 17:09:23 -04:00
Christian Muehlhaeuser 9e324205c2 Bump bubbletea, termenv, reflow, go-runewidth, and go-colorful deps 2021-04-03 01:56:59 +02:00
Christian MuehlhaeuserandChristian Rocha b2f42066a2 Drop naked returns in textinput model
This actually uncovered a few ineffective assignments, particularly
in deleteWordRight.
2021-03-11 20:09:32 -05:00
Christian Muehlhaeuser a0d7cb77a1 Fix godocs for various types and functions 2021-03-12 02:06:30 +01:00
Christian Muehlhaeuser 046b9ca129 Enable golint as linter 2021-03-12 02:00:32 +01:00
Christian Muehlhaeuser da9a4049de Mark innocuous numbers as nolint 2021-03-12 01:47:40 +01:00
Christian Muehlhaeuser 490a599c05 Use a const for the mouse wheel delta in viewport 2021-03-12 01:33:51 +01:00
KiyonandChristian Rocha f719cc8cb1 Reset cursor in SetValue when initial pos is 0 2021-03-09 10:21:17 -05:00
Christian Rocha c8f4855d20 Fix typo in README v0.7.6 2021-01-12 18:19:20 -05:00
Christian Rocha 43d43d14ae A external link to progress example and remove local example 2021-01-12 18:17:42 -05:00
Christian RochaandGitHub de359c53bb README: improve wording + image update for dark backgrounds 2021-01-12 17:53:56 -05:00
Christian RochaandGitHub c7d69b61f0 Add progressbar info and GIF to README 2021-01-12 17:27:14 -05:00
Christian RochaandChristian Rocha 11f56f9b6b If using advanced settings, draw empty spinner when appropriate
When model.HideFor or model.MinimumLifetime is present, we won't draw
the spinner in cases where model.Visibe() returns false.
2020-12-11 19:37:37 -05:00
Christian RochaandChristian Rocha 3be2d0585b Prevent spinner from responding to extra, unintentional tick messages 2020-12-11 19:37:37 -05:00
Christian Rocha 37a85afcd1 Fix a typo in a comment 2020-12-10 11:36:22 -05:00
Christian RochaandChristian Rocha f9c79eef64 Slightly more subtle default gradient 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha c303de1e85 Replace "ramp" with "gradient" on exposed functions 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 7e5ef42924 Add ability to style percentage readout 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 79ca4d09d1 Fix doc comments and remove magic number 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha f48e53556a Return an error if we could not initialize a new gradient ramp 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 5d6d8cb0fb Add functional argument for setting the width of the progress bar 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 47b8d9c6a8 Doc comments, optimizations, and magic number removal 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha b78277e7ec Add progress bar example 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 6a768905a6 Add initialization options for scaled ramps 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 0f06d78b92 Support for solid (non-gradient) fills too 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 1e16eca939 Set ramp in NewModel via functional argument 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha d81e5713d4 Cache termenv color profile lookup 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha b10dbcb4dd Add option to show percent 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha a2e0a2e72e Remove initial width argument; add default width 2020-12-01 17:03:48 -05:00
Christian RochaandChristian Rocha 3dea7d036e Reduce progress component to (more or less) a pure view function
We really only need the View function in this case since the progress
value will come from the program that implements this.
2020-12-01 17:03:48 -05:00
Richard CooperandChristian Rocha 68e87e08c5 gofmt-ed last commit 2020-12-01 17:03:48 -05:00
Richard CooperandChristian Rocha 65a17d039e length field changed to width 2020-12-01 17:03:48 -05:00
ololosha228andChristian Rocha 38d59517fb Added progress bar 2020-12-01 17:03:48 -05:00
Christian RochaandGitHub 06109f45ce Add Bubbles title treatment to README 2020-11-19 19:11:24 -05:00
Christian RochaandChristian Rocha 9cb8e8d90a Remove spaces after emoji spinners v0.7.5 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha e6219572e5 Add points spinner 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha 81feaacf5b Remove bit8 spinner 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha 9a25d8b8b9 Add pulse spinner 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha e8e052c64b Add mini dot spinner 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha 3d7cd43046 Rework Spinner so that default spinners have FPS built-in 2020-11-11 15:39:42 -05:00
Christian RochaandChristian Rocha 9c38e101d2 Remove internal msg in spinner so all tick msgs can be caught externally 2020-11-10 15:44:42 -05:00
Christian RochaandChristian Rocha 84f7b047bb Make Viewport more idomatic BubbleTea (per v0.12.x) v0.7.4 2020-11-08 21:20:15 -05:00
Christian RochaandChristian Rocha 9e1e435bba Make Spinner more idomatic Bubble Tea (per v0.12.x) 2020-11-08 21:20:15 -05:00