Commit Graph

376 Commits

Author SHA1 Message Date
Christian Rocha 4e2643f318 Make sure we pass our mutex by reference 2021-02-27 16:03:34 -05:00
Christian Rocha 65cb46c475
Remove notes about how we'd auto-truncate lines as we're doing that now 2021-02-25 12:12:52 -05:00
Carl Henrik Lunde 3266c3654b Avoid race on renderer.buf in flush vs. write
Fix race by acquiring the mutex before accessing renderer.buf in flush.

	WARNING: DATA RACE
	Read at 0x00c0000ee0a0 by goroutine 11:
	  bytes.(*Buffer).Len()
	      /home/chlunde/opt/go/src/bytes/buffer.go:73 +0x64
	  github.com/charmbracelet/bubbletea.(*renderer).flush()
	      /home/chlunde/src/bubbletea/renderer.go:91 +0x45
	  github.com/charmbracelet/bubbletea.(*renderer).listen()
	      /home/chlunde/src/bubbletea/renderer.go:76 +0x185

	Previous write at 0x00c0000ee0a0 by main goroutine:
	  bytes.(*Buffer).Reset()
	      /home/chlunde/opt/go/src/bytes/buffer.go:98 +0xf5
	  github.com/charmbracelet/bubbletea.(*renderer).write()
	      /home/chlunde/src/bubbletea/renderer.go:195 +0x13c
	  github.com/charmbracelet/bubbletea.(*Program).Start()
	      /home/chlunde/src/bubbletea/tea.go:330 +0xbbb
	  main.main()
	      /home/chlunde/src/bubbletea/examples/spinner/main.go:27 +0x229

Fixes #54
2021-02-25 10:56:48 -05:00
Christian Muehlhaeuser 92a795256a go mod tidy 2021-02-25 10:49:33 -05:00
Christian Rocha 91bd232fe2 Add example illustrating how to send messages via channels in realtime 2021-02-10 00:01:37 +00:00
Christian Rocha dd6a0a092e Bump deps in examples 2021-02-06 19:21:40 +00:00
Christian Rocha d3267e8ce0 Remove logging in text input example 2021-02-06 19:21:40 +00:00
Christian Rocha 133a315b2c Remove double import in textinput example + make a var name less weird 2021-02-06 19:21:40 +00:00
Christian Rocha 479a1ceb35 Add space after prefix if one doesn't exist 2021-02-03 15:30:54 -05:00
Ani Channarasappa ef8a6895a1 docs: Added ticker to list of things built with Bubble Tea 2021-01-30 12:13:42 -05:00
Christian Rocha 88e11cf709
Add tasktimer and STTG to list of things built with Bubble Tea 2021-01-19 11:21:42 -05:00
Carlos Alexandro Becker a0c6074bbb Add a tea.Sequentially command
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 13:14:40 -05:00
Carlos Alexandro Becker b65205a7e5 Unused params
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 15:58:50 +01:00
Carlos Alexandro Becker b2d948b53c Fixed a couple of typos
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-01-17 15:58:50 +01:00
Christian Rocha e9efdf841b
Bump reflow for updated go-runewidth 2021-01-15 12:36:59 -05:00
Christian Rocha 0e32261508
Improve README in dark mode 2021-01-15 12:36:08 -05:00
Christian Rocha 1f6191c671 Automatically trim lines wider than the window width 2021-01-14 20:14:39 -05:00
Christian Rocha 505b826b8a
Add fork-cleaner to list of projects using Bubble Tea 2021-01-14 17:52:10 -05:00
Christian Rocha cb8e9023eb
Update Bubble dependecy in examples 2021-01-13 18:27:49 -05:00
Christian Rocha 98f449bb08
List a couple more tools built with Bubble Tea 2021-01-13 18:06:22 -05:00
Christian Rocha df0da42954
Add progressbar example 2021-01-12 18:13:29 -05:00
Christian Rocha 9f04c936da Always listen for SIGINT 2021-01-11 18:11:28 -05:00
Christian Rocha 64da3bcf7a Use correct output when enabling ANSI colors on Windows (see #39) 2020-12-30 22:23:19 -05:00
Christian Rocha c4aeadd762 Generalize output from an *os.File to an io.Writer 2020-12-30 17:59:00 -05:00
Christoph Hartmann e84314c622 allow custom input and handle eof for os.input properly
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2020-12-30 17:59:00 -05:00
Christian Rocha bc06e8d2e0
Fix wording in, and generally improve, a comment 2020-12-14 20:24:17 -05:00
Christian Rocha 01cb02ddd1
Correct help in spinners demo (see #38) 2020-12-07 17:38:44 -05:00
Christian Rocha 8e01f5f58a Add command for hiding the cursor 2020-12-03 13:56:37 -05:00
Christian Rocha 6d70abd7d5 When showing/hiding the cursor operate on the program's io.Writer
Previously we were operating on io.Stdout.
2020-12-03 13:56:37 -05:00
Richard Cooper f5fde56af0 Fix adding prefix to file logs 2020-11-22 21:45:29 -05:00
Christian Rocha ec67f23001 Add spinner browser to examples 2020-11-12 11:35:23 -05:00
Christian Rocha fce5ce7782 Update spinner demo for Bubbles v0.7.5 2020-11-12 11:35:23 -05:00
Christian Rocha 454d198b0a
Update examples for Bubbles v0.7.4 2020-11-08 21:29:04 -05:00
Christian Rocha 28db8b465a
The q key also quits in the pager example 2020-11-08 21:25:52 -05:00
Christian Rocha 5d34c88692
Update examples for Bubbles v0.8.0 2020-11-08 21:22:39 -05:00
Aleksandr Krivoshchekov 02a0509e34
Simplify code and add tests for `mouse.go` (#30) 2020-11-07 06:43:12 +01:00
Kyosuke Fujimoto 3aa00243ff Fix links in documents 2020-11-03 23:26:24 -05:00
SuperPaintman 216b195175 Update `go.mod` in examples and tutorial 2020-11-03 20:19:53 -05:00
SuperPaintman 1545c07a0d Build examples and tutorial in build workflow 2020-11-03 20:19:53 -05:00
SuperPaintman 892bebd617 Fix a mouse example 2020-11-03 20:19:53 -05:00
Christian Rocha 116a0cfb8f Process alt-modfied keystrokes before normal character input 2020-11-01 08:57:43 -05:00
Christian Rocha 1b5f599f2d Update key usage examples 2020-11-01 08:57:43 -05:00
Christian Rocha 4f2d85494d Remove the excessive Key.IsRune() method 2020-11-01 08:57:43 -05:00
Christian Rocha fc37167e16 Support multi-character input (i.e. Chinese and Japanese IME) 2020-11-01 08:57:43 -05:00
Christian Muehlhaeuser eae4d66917
Remove duped import 2020-10-30 08:37:58 +01:00
Christian Rocha 1e0283511e Update textinputs for next Bubbles release 2020-10-28 22:30:55 -04:00
Christian Rocha 30e88cb04e
Bump reflow to v0.2.0 in examples 2020-10-26 21:23:25 -04:00
Christian Rocha 93adce2131
Minor simplification to countdown example 2020-10-25 17:08:58 -04:00
Christian Rocha 9a3a101244
Add timer countdown example 2020-10-25 16:57:11 -04:00
Christian Muehlhaeuser 28d5ca1cf2
Add release badge to README 2020-10-24 08:40:36 +02:00